From 50c086ffb94f199c088f4cc52b7887b668dddf00 Mon Sep 17 00:00:00 2001 From: zwelch Date: Tue, 23 Jun 2009 22:36:11 +0000 Subject: - Replace 'while(' with 'while ('. git-svn-id: svn://svn.berlios.de/openocd/trunk@2358 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/target/arm11_dbgtap.c | 2 +- src/target/cortex_m3.c | 4 ++-- src/target/mips32_dmaacc.c | 12 ++++++------ src/target/mips_m4k.c | 2 +- src/target/target.c | 26 +++++++++++++------------- 5 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src/target') diff --git a/src/target/arm11_dbgtap.c b/src/target/arm11_dbgtap.c index 8788ba9..6a5b7ba 100644 --- a/src/target/arm11_dbgtap.c +++ b/src/target/arm11_dbgtap.c @@ -30,7 +30,7 @@ #if 0 #define JTAG_DEBUG(expr ...) DEBUG(expr) #else -#define JTAG_DEBUG(expr ...) do {} while(0) +#define JTAG_DEBUG(expr ...) do {} while (0) #endif /* diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 1ffa604..94fd687 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -908,7 +908,7 @@ int cortex_m3_set_breakpoint(struct target_s *target, breakpoint_t *breakpoint) if (breakpoint->type == BKPT_HARD) { - while(comparator_list[fp_num].used && (fp_num < cortex_m3->fp_num_code)) + while (comparator_list[fp_num].used && (fp_num < cortex_m3->fp_num_code)) fp_num++; if (fp_num >= cortex_m3->fp_num_code) { @@ -1091,7 +1091,7 @@ int cortex_m3_set_watchpoint(struct target_s *target, watchpoint_t *watchpoint) if (watchpoint->mask == 0xffffffffu) { - while(comparator_list[dwt_num].used && (dwt_num < cortex_m3->dwt_num_comp)) + while (comparator_list[dwt_num].used && (dwt_num < cortex_m3->dwt_num_comp)) dwt_num++; if (dwt_num >= cortex_m3->dwt_num_comp) { diff --git a/src/target/mips32_dmaacc.c b/src/target/mips32_dmaacc.c index 9727f4e..cd73d6e 100644 --- a/src/target/mips32_dmaacc.c +++ b/src/target/mips32_dmaacc.c @@ -61,7 +61,7 @@ begin_ejtag_dma_read: do { ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl; mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl); - } while(ejtag_ctrl & EJTAG_CTRL_DSTRT); + } while (ejtag_ctrl & EJTAG_CTRL_DSTRT); /* Read Data */ mips_ejtag_set_instr(ejtag_info, EJTAG_INST_DATA, NULL); @@ -107,7 +107,7 @@ begin_ejtag_dma_read_h: do { ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl; mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl); - } while(ejtag_ctrl & EJTAG_CTRL_DSTRT); + } while (ejtag_ctrl & EJTAG_CTRL_DSTRT); /* Read Data */ mips_ejtag_set_instr(ejtag_info, EJTAG_INST_DATA, NULL); @@ -159,7 +159,7 @@ begin_ejtag_dma_read_b: do { ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl; mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl); - } while(ejtag_ctrl & EJTAG_CTRL_DSTRT); + } while (ejtag_ctrl & EJTAG_CTRL_DSTRT); /* Read Data */ mips_ejtag_set_instr(ejtag_info, EJTAG_INST_DATA, NULL); @@ -226,7 +226,7 @@ begin_ejtag_dma_write: do { ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl; mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl); - } while(ejtag_ctrl & EJTAG_CTRL_DSTRT); + } while (ejtag_ctrl & EJTAG_CTRL_DSTRT); /* Clear DMA & Check DERR */ mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL); @@ -277,7 +277,7 @@ begin_ejtag_dma_write_h: do { ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl; mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl); - } while(ejtag_ctrl & EJTAG_CTRL_DSTRT); + } while (ejtag_ctrl & EJTAG_CTRL_DSTRT); /* Clear DMA & Check DERR */ mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL); @@ -329,7 +329,7 @@ begin_ejtag_dma_write_b: do { ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl; mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl); - } while(ejtag_ctrl & EJTAG_CTRL_DSTRT); + } while (ejtag_ctrl & EJTAG_CTRL_DSTRT); /* Clear DMA & Check DERR */ mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL); diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c index be88df8..71dab5d 100644 --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -509,7 +509,7 @@ int mips_m4k_set_breakpoint(struct target_s *target, breakpoint_t *breakpoint) { int bp_num = 0; - while(comparator_list[bp_num].used && (bp_num < mips32->num_inst_bpoints)) + while (comparator_list[bp_num].used && (bp_num < mips32->num_inst_bpoints)) bp_num++; if (bp_num >= mips32->num_inst_bpoints) { diff --git a/src/target/target.c b/src/target/target.c index 3505f9c..10e8660 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -244,7 +244,7 @@ static int max_target_number(void) x = -1; t = all_targets; - while( t ){ + while ( t ){ if ( x < t->target_number ){ x = (t->target_number)+1; } @@ -262,7 +262,7 @@ static int new_target_number(void) /* number is 0 based */ x = -1; t = all_targets; - while(t){ + while (t){ if ( x < t->target_number ){ x = t->target_number; } @@ -1728,7 +1728,7 @@ static int handle_reg_command(struct command_context_s *cmd_ctx, char *cmd, char reg_cache_t *cache = target->reg_cache; count = 0; - while(cache) + while (cache) { int i; for (i = 0; i < cache->num_regs; i++) @@ -1759,7 +1759,7 @@ static int handle_reg_command(struct command_context_s *cmd_ctx, char *cmd, char reg_cache_t *cache = target->reg_cache; count = 0; - while(cache) + while (cache) { int i; for (i = 0; i < cache->num_regs; i++) @@ -3378,7 +3378,7 @@ void target_handle_event( target_t *target, enum target_event e ) teap = target->event_action; done = 0; - while( teap ){ + while ( teap ){ if ( teap->event == e ){ done = 1; LOG_DEBUG( "target: (%d) %s (%s) event: %d (%s) action: %s\n", @@ -3437,7 +3437,7 @@ static int target_configure( Jim_GetOptInfo *goi, target_t *target ) int e; /* parse config or cget options ... */ - while( goi->argc > 0 ){ + while ( goi->argc > 0 ){ Jim_SetEmptyResult( goi->interp ); /* Jim_GetOpt_Debug( goi ); */ @@ -3505,7 +3505,7 @@ static int target_configure( Jim_GetOptInfo *goi, target_t *target ) teap = target->event_action; /* replace existing? */ - while( teap ){ + while ( teap ){ if ( teap->event == (enum target_event)n->value ){ break; } @@ -3687,7 +3687,7 @@ static int target_configure( Jim_GetOptInfo *goi, target_t *target ) /* loop for more e*/ break; } - } /* while( goi->argc ) */ + } /* while ( goi->argc ) */ /* done - we return */ @@ -3881,7 +3881,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv ) /* convert to "bytes" */ c = c * b; /* count is now in 'BYTES' */ - while( c > 0 ){ + while ( c > 0 ){ y = c; if ( y > 16 ){ y = 16; @@ -3934,7 +3934,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv ) } } /* space pad */ - while( x < 16 ){ + while ( x < 16 ){ target_buf[x] = ' '; x++; } @@ -4063,7 +4063,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv ) target->cmd_name ); command_print( cmd_ctx, "%-25s | Body", "Event"); command_print( cmd_ctx, "------------------------- | ----------------------------------------"); - while( teap ){ + while ( teap ){ command_print( cmd_ctx, "%-25s | %s", Jim_Nvp_value2name_simple( nvp_target_event, teap->event )->name, @@ -4236,7 +4236,7 @@ static int target_create( Jim_GetOptInfo *goi ) { target_t **tpp; tpp = &(all_targets); - while( *tpp ){ + while ( *tpp ){ tpp = &( (*tpp)->next ); } *tpp = target; @@ -4326,7 +4326,7 @@ static int jim_target( Jim_Interp *interp, int argc, Jim_Obj *const *argv ) } Jim_SetResult( goi.interp, Jim_NewListObj( goi.interp, NULL, 0 ) ); target = all_targets; - while( target ){ + while ( target ){ Jim_ListAppendElement( goi.interp, Jim_GetResult(goi.interp), Jim_NewStringObj( goi.interp, target->cmd_name, -1 ) ); -- cgit v1.1