From: zwelch Date: Tue, 23 Jun 2009 22:39:18 +0000 (+0000) Subject: - Fixes '[+]=' whitespace X-Git-Tag: v0.2.0~151 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d61714f4d5d72f9f39fbccbb1c3ba5f3d8982020;p=openocd - Fixes '[+]=' whitespace - Replace '\(\w\)\([+]=\)(' with '\1 \2 ('. - Replace '\(\w\)\([+]=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2364 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- diff --git a/src/flash/cfi.c b/src/flash/cfi.c index f6ddead3..1d4ae537 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -1014,7 +1014,7 @@ static void cfi_fix_code_endian(target_t *target, uint8_t *dest, const uint32_t for (i=0; i< count; i++) { target_buffer_set_u32(target, dest, *src); - dest+=4; + dest += 4; src++; } } diff --git a/src/flash/ecos.c b/src/flash/ecos.c index 5d1badd6..ec3b3c13 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -319,7 +319,7 @@ static int eCosBoard_flash(ecosflash_flash_bank_t *info, void *data, uint32_t ad uint32_t i; - for (i=0; ichunk) diff --git a/src/flash/mflash.c b/src/flash/mflash.c index 8518df19..b26e62b7 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -278,7 +278,7 @@ static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time) duration_stop_measure(&duration, NULL); t=duration.duration.tv_usec/1000; - t+=duration.duration.tv_sec*1000; + t += duration.duration.tv_sec*1000; if (t > time) break; diff --git a/src/flash/ocl/at91sam7x/main.c b/src/flash/ocl/at91sam7x/main.c index 3d88d91a..6ecbf35a 100644 --- a/src/flash/ocl/at91sam7x/main.c +++ b/src/flash/ocl/at91sam7x/main.c @@ -64,7 +64,7 @@ void cmd_flash(uint32 cmd) result=0; pagenum=adr/flash_page_size; - for (bi=0; biflash_page_count) break; + if ((page_num += flash_lock_pages)>flash_page_count) break; lockbits>>=1; } diff --git a/src/helper/log.c b/src/helper/log.c index b596075f..0e04af6f 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -429,7 +429,7 @@ void alive_sleep(int ms) { int i; int napTime=10; - for (i=0; inapTime) diff --git a/src/helper/time_support.c b/src/helper/time_support.c index 7a9a8001..922d411d 100644 --- a/src/helper/time_support.c +++ b/src/helper/time_support.c @@ -100,7 +100,7 @@ int duration_stop_measure(duration_t *duration, char **text) { float t; t=duration->duration.tv_sec; - t+=(float)duration->duration.tv_usec/1000000.0; + t += (float)duration->duration.tv_usec/1000000.0; *text = malloc(100); snprintf(*text, 100, "%fs", t); } @@ -114,8 +114,8 @@ long long timeval_ms() long long t=0; gettimeofday(&now, NULL); - t+=now.tv_usec/1000; - t+=now.tv_sec*1000; + t += now.tv_usec/1000; + t += now.tv_sec*1000; return t; } diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 2be7f87b..24870ab2 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -1274,7 +1274,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args /* validate arguments as numbers */ e = JIM_OK; - for (i = 2; i < argc; i+=2) + for (i = 2; i < argc; i += 2) { long bits; const char *cp; @@ -1333,7 +1333,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args num_fields=(argc-2)/2; fields = malloc(sizeof(scan_field_t) * num_fields); - for (i = 2; i < argc; i+=2) + for (i = 2; i < argc; i += 2) { long bits; int len; @@ -1361,7 +1361,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args field_count=0; Jim_Obj *list = Jim_NewListObj(interp, NULL, 0); - for (i = 2; i < argc; i+=2) + for (i = 2; i < argc; i += 2) { long bits; char *str; diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index d31b4336..5e4bda0f 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -455,7 +455,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_ value=0; if (fields[i].out_value != NULL) { - for (l=0; l>= 32-k; - for (l=0; l>l)&0xff; } } - j+=k; + j += k; } } } @@ -634,7 +634,7 @@ static int zy1000_jtag_add_clocks(int num_cycles, tap_state_t state, tap_state_t /* execute num_cycles, 32 at the time. */ int i; - for (i=0; ieice_cache->reg_list[EICE_COMMS_DATA], fast_target_buffer_get_u32(buffer, little)); - buffer+=4; + buffer += 4; embeddedice_reg_t *ice_reg = arm7_9->eice_cache->reg_list[EICE_COMMS_DATA].arch_info; uint8_t reg_addr = ice_reg->addr & 0x1f; diff --git a/src/target/image.c b/src/target/image.c index 66bcc95f..45107b48 100644 --- a/src/target/image.c +++ b/src/target/image.c @@ -764,7 +764,7 @@ int image_open(image_t *image, char *url, char *type_string) int section; for (section=0; section < image->num_sections; section++) { - image->sections[section].base_address+=image->base_address; + image->sections[section].base_address += image->base_address; } /* we're done relocating. The two statements below are mainly * for documenation purposes: stop anyone from empirically diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c index 4e032f65..06e852ba 100644 --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -314,8 +314,8 @@ int mips32_pracc_read_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_SW(8,0,11), /* sw $8,0($11) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,4), /* $1+=4 */ - MIPS32_ADDI(11,11,4), /* $11+=4 */ + MIPS32_ADDI(9,9,4), /* $1 += 4 */ + MIPS32_ADDI(11,11,4), /* $11 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ @@ -422,8 +422,8 @@ int mips32_pracc_read_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_SW(8,0,11), /* sw $8,0($11) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,2), /* $9+=2 */ - MIPS32_ADDI(11,11,4), /* $11+=4 */ + MIPS32_ADDI(9,9,2), /* $9 += 2 */ + MIPS32_ADDI(11,11,4), /* $11 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ MIPS32_NOP, @@ -501,8 +501,8 @@ int mips32_pracc_read_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, u MIPS32_SW(8,0,11), /* sw $8,0($11) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,1), /* $9+=1 */ - MIPS32_ADDI(11,11,4), /* $11+=4 */ + MIPS32_ADDI(9,9,1), /* $9 += 1 */ + MIPS32_ADDI(11,11,4), /* $11 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ MIPS32_NOP, @@ -588,15 +588,15 @@ int mips32_pracc_write_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_ADDI(8,15,NEG16(MIPS32_PRACC_STACK-MIPS32_PRACC_PARAM_IN)), //$8= MIPS32_PRACC_PARAM_IN MIPS32_LW(9,0,8), /* Load write addr to $9 */ MIPS32_LW(10,4,8), //last address /* Load write count to $10 */ - MIPS32_ADDI(8,8,8), // $8+=8 beginning of data + MIPS32_ADDI(8,8,8), // $8 += 8 beginning of data //loop: MIPS32_LW(11,0,8), /* lw $11,0($8), Load $11 with the word @mem[$8] */ MIPS32_SW(11,0,9), /* sw $11,0($9) */ - MIPS32_ADDI(9,9,4), /* $9+=4 */ + MIPS32_ADDI(9,9,4), /* $9 += 4 */ MIPS32_BNE(10,9,NEG16(4)), //was 9 BNE $10, 9, loop /* b loop */ - MIPS32_ADDI(8,8,4), //this instruction is part of the loop (one delay slot)! /* $8+=4 */ + MIPS32_ADDI(8,8,4), //this instruction is part of the loop (one delay slot)! /* $8 += 4 */ /* end: */ MIPS32_LW(11,0,15), /* lw $11,($15) */ MIPS32_LW(10,0,15), /* lw $10,($15) */ @@ -669,7 +669,7 @@ int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)), MIPS32_LW(9,0,8), /* Load write addr to $9 */ MIPS32_LW(10,4,8), /* Load write count to $10 */ - MIPS32_ADDI(8,8,8), /* $8+=8 */ + MIPS32_ADDI(8,8,8), /* $8 += 8 */ MIPS32_NOP, /* loop: */ MIPS32_BEQ(0,10,9), /* beq $0, $10, end */ @@ -679,8 +679,8 @@ int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_SH(11,0,9), /* sh $11,0($9) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,2), /* $9+=2 */ - MIPS32_ADDI(8,8,4), /* $8+=4 */ + MIPS32_ADDI(9,9,2), /* $9 += 2 */ + MIPS32_ADDI(8,8,4), /* $8 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ @@ -729,7 +729,7 @@ int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)), MIPS32_LW(9,0,8), /* Load write addr to $9 */ MIPS32_LW(10,4,8), /* Load write count to $10 */ - MIPS32_ADDI(8,8,8), /* $8+=8 */ + MIPS32_ADDI(8,8,8), /* $8 += 8 */ MIPS32_NOP, /* loop: */ MIPS32_BEQ(0,10,9), /* beq $0, $10, end */ @@ -739,8 +739,8 @@ int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_SB(11,0,9), /* sb $11,0($9) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,1), /* $9+=1 */ - MIPS32_ADDI(8,8,4), /* $8+=4 */ + MIPS32_ADDI(9,9,1), /* $9 += 1 */ + MIPS32_ADDI(8,8,4), /* $8 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ diff --git a/src/target/target.c b/src/target/target.c index 5ff22324..56bcdf05 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2285,7 +2285,7 @@ static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cm if (image.sections[i].base_address