aboutsummaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:37:21 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:37:21 +0000
commit95d2a2372421aeddae01f1af51279ab7989e46b5 (patch)
treeee7907029137638c353969e5ada42e4dc7dd2779 /src/target
parent9af5e445b796f3b4a51d41f9d2eeaf1f5cd78e3b (diff)
downloadriscv-openocd-95d2a2372421aeddae01f1af51279ab7989e46b5.zip
riscv-openocd-95d2a2372421aeddae01f1af51279ab7989e46b5.tar.gz
riscv-openocd-95d2a2372421aeddae01f1af51279ab7989e46b5.tar.bz2
- Replace 'for(' with 'for ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2360 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target')
-rw-r--r--src/target/mips_m4k.c4
-rw-r--r--src/target/target.c22
-rw-r--r--src/target/xscale.c4
3 files changed, 15 insertions, 15 deletions
diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c
index c1b279b..e4259ae 100644
--- a/src/target/mips_m4k.c
+++ b/src/target/mips_m4k.c
@@ -763,7 +763,7 @@ int mips_m4k_read_memory(struct target_s *target, uint32_t address, uint32_t siz
uint32_t i, t32;
uint16_t t16;
- for(i = 0; i < (count*size); i += size)
+ for (i = 0; i < (count*size); i += size)
{
switch (size)
{
@@ -808,7 +808,7 @@ int mips_m4k_write_memory(struct target_s *target, uint32_t address, uint32_t si
uint32_t i, t32;
uint16_t t16;
- for(i = 0; i < (count*size); i += size)
+ for (i = 0; i < (count*size); i += size)
{
switch (size)
{
diff --git a/src/target/target.c b/src/target/target.c
index a427c66..1594645 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -3829,7 +3829,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
b = 1;
break;
}
- for( x = 0 ; x < c ; x++ ){
+ for ( x = 0 ; x < c ; x++ ){
e = target_write_memory( target, a, b, 1, target_buf );
if ( e != ERROR_OK ){
Jim_SetResult_sprintf( interp, "Error writing @ 0x%08x: %d\n", (int)(a), e );
@@ -3895,36 +3895,36 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
Jim_fprintf( interp, interp->cookie_stdout, "0x%08x ", (int)(a) );
switch ( b ){
case 4:
- for( x = 0 ; (x < 16) && (x < y) ; x += 4 ){
+ for ( x = 0 ; (x < 16) && (x < y) ; x += 4 ){
z = target_buffer_get_u32( target, &(target_buf[ x * 4 ]) );
Jim_fprintf( interp, interp->cookie_stdout, "%08x ", (int)(z) );
}
- for( ; (x < 16) ; x += 4 ){
+ for ( ; (x < 16) ; x += 4 ){
Jim_fprintf( interp, interp->cookie_stdout, " " );
}
break;
case 2:
- for( x = 0 ; (x < 16) && (x < y) ; x += 2 ){
+ for ( x = 0 ; (x < 16) && (x < y) ; x += 2 ){
z = target_buffer_get_u16( target, &(target_buf[ x * 2 ]) );
Jim_fprintf( interp, interp->cookie_stdout, "%04x ", (int)(z) );
}
- for( ; (x < 16) ; x += 2 ){
+ for ( ; (x < 16) ; x += 2 ){
Jim_fprintf( interp, interp->cookie_stdout, " " );
}
break;
case 1:
default:
- for( x = 0 ; (x < 16) && (x < y) ; x += 1 ){
+ for ( x = 0 ; (x < 16) && (x < y) ; x += 1 ){
z = target_buffer_get_u8( target, &(target_buf[ x * 4 ]) );
Jim_fprintf( interp, interp->cookie_stdout, "%02x ", (int)(z) );
}
- for( ; (x < 16) ; x += 1 ){
+ for ( ; (x < 16) ; x += 1 ){
Jim_fprintf( interp, interp->cookie_stdout, " " );
}
break;
}
/* ascii-ify the bytes */
- for( x = 0 ; x < y ; x++ ){
+ for ( x = 0 ; x < y ; x++ ){
if ( (target_buf[x] >= 0x20) &&
(target_buf[x] <= 0x7e) ){
/* good */
@@ -4132,7 +4132,7 @@ static int target_create( Jim_GetOptInfo *goi )
e = Jim_GetOpt_String( goi, &cp2, NULL );
cp = cp2;
/* now does target type exist */
- for( x = 0 ; target_types[x] ; x++ ){
+ for ( x = 0 ; target_types[x] ; x++ ){
if ( 0 == strcmp( cp, target_types[x]->name ) ){
/* found */
break;
@@ -4140,7 +4140,7 @@ static int target_create( Jim_GetOptInfo *goi )
}
if ( target_types[x] == NULL ){
Jim_SetResult_sprintf( goi->interp, "Unknown target type %s, try one of ", cp );
- for( x = 0 ; target_types[x] ; x++ ){
+ for ( x = 0 ; target_types[x] ; x++ ){
if ( target_types[x+1] ){
Jim_AppendStrings( goi->interp,
Jim_GetResult(goi->interp),
@@ -4313,7 +4313,7 @@ static int jim_target( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
return JIM_ERR;
}
Jim_SetResult( goi.interp, Jim_NewListObj( goi.interp, NULL, 0 ) );
- for( x = 0 ; target_types[x] ; x++ ){
+ for ( x = 0 ; target_types[x] ; x++ ){
Jim_ListAppendElement( goi.interp,
Jim_GetResult(goi.interp),
Jim_NewStringObj( goi.interp, target_types[x]->name, -1 ) );
diff --git a/src/target/xscale.c b/src/target/xscale.c
index 1e20afa..e9c1d54 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -1783,7 +1783,7 @@ int xscale_full_context(target_t *target)
* we can't enter User mode on an XScale (unpredictable),
* but User shares registers with SYS
*/
- for(i = 1; i < 7; i++)
+ for (i = 1; i < 7; i++)
{
int valid = 1;
@@ -1855,7 +1855,7 @@ int xscale_restore_context(target_t *target)
* we can't enter User mode on an XScale (unpredictable),
* but User shares registers with SYS
*/
- for(i = 1; i < 7; i++)
+ for (i = 1; i < 7; i++)
{
int dirty = 0;