aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/flash/cfi.c24
-rw-r--r--src/flash/ecos.c2
-rw-r--r--src/flash/flash.c4
-rw-r--r--src/flash/mflash.c2
-rw-r--r--src/flash/stm32x.c8
-rw-r--r--src/helper/jim.c78
-rw-r--r--src/helper/jim.h4
-rw-r--r--src/jtag/interface.c8
-rw-r--r--src/jtag/rlink/rlink.c4
-rw-r--r--src/jtag/tcl.c8
-rw-r--r--src/jtag/vsllink.c2
-rw-r--r--src/server/gdb_server.c6
-rw-r--r--src/svf/svf.c8
-rw-r--r--src/target/arm_disassembler.c8
-rw-r--r--src/target/image.c2
-rw-r--r--src/target/mips_m4k.c4
-rw-r--r--src/target/target.c14
-rw-r--r--src/target/xscale.c2
-rw-r--r--src/xsvf/xsvf.c4
19 files changed, 96 insertions, 96 deletions
diff --git a/src/flash/cfi.c b/src/flash/cfi.c
index b14f0e9..5298907 100644
--- a/src/flash/cfi.c
+++ b/src/flash/cfi.c
@@ -806,7 +806,7 @@ static int cfi_erase(struct flash_bank_s *bank, int first, int last)
if (cfi_info->qry[0] != 'Q')
return ERROR_FLASH_BANK_NOT_PROBED;
- switch(cfi_info->pri_id)
+ switch (cfi_info->pri_id)
{
case 1:
case 3:
@@ -958,7 +958,7 @@ static int cfi_protect(struct flash_bank_s *bank, int set, int first, int last)
if (cfi_info->qry[0] != 'Q')
return ERROR_FLASH_BANK_NOT_PROBED;
- switch(cfi_info->pri_id)
+ switch (cfi_info->pri_id)
{
case 1:
case 3:
@@ -1601,7 +1601,7 @@ static int cfi_intel_write_words(struct flash_bank_s *bank, uint8_t *word, uint3
bank->base, address, cfi_info->max_buf_write_size);
return ERROR_FLASH_OPERATION_FAILED;
}
- switch(bank->chip_width)
+ switch (bank->chip_width)
{
case 4 : bufferwsize = buffersize / 4; break;
case 2 : bufferwsize = buffersize / 2; break;
@@ -1740,7 +1740,7 @@ static int cfi_spansion_write_words(struct flash_bank_s *bank, uint8_t *word, ui
LOG_ERROR("Write address at base 0x%" PRIx32 ", address %" PRIx32 " not aligned to 2^%d boundary", bank->base, address, cfi_info->max_buf_write_size);
return ERROR_FLASH_OPERATION_FAILED;
}
- switch(bank->chip_width)
+ switch (bank->chip_width)
{
case 4 : bufferwsize = buffersize / 4; break;
case 2 : bufferwsize = buffersize / 2; break;
@@ -1817,7 +1817,7 @@ static int cfi_write_word(struct flash_bank_s *bank, uint8_t *word, uint32_t add
{
cfi_flash_bank_t *cfi_info = bank->driver_priv;
- switch(cfi_info->pri_id)
+ switch (cfi_info->pri_id)
{
case 1:
case 3:
@@ -1838,7 +1838,7 @@ static int cfi_write_words(struct flash_bank_s *bank, uint8_t *word, uint32_t wo
{
cfi_flash_bank_t *cfi_info = bank->driver_priv;
- switch(cfi_info->pri_id)
+ switch (cfi_info->pri_id)
{
case 1:
case 3:
@@ -1927,7 +1927,7 @@ int cfi_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint3
/* handle blocks of bus_size aligned bytes */
blk_count = count & ~(bank->bus_width - 1); /* round down, leave tail bytes */
- switch(cfi_info->pri_id)
+ switch (cfi_info->pri_id)
{
/* try block writes (fails without working area) */
case 1:
@@ -1958,7 +1958,7 @@ int cfi_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint3
uint32_t buffermask = buffersize-1;
uint32_t bufferwsize;
- switch(bank->chip_width)
+ switch (bank->chip_width)
{
case 4 : bufferwsize = buffersize / 4; break;
case 2 : bufferwsize = buffersize / 2; break;
@@ -2293,7 +2293,7 @@ static int cfi_probe(struct flash_bank_s *bank)
/* We need to read the primary algorithm extended query table before calculating
* the sector layout to be able to apply fixups
*/
- switch(cfi_info->pri_id)
+ switch (cfi_info->pri_id)
{
/* Intel command set (standard and extended) */
case 0x0001:
@@ -2326,7 +2326,7 @@ static int cfi_probe(struct flash_bank_s *bank)
} /* end CFI case */
/* apply fixups depending on the primary command set */
- switch(cfi_info->pri_id)
+ switch (cfi_info->pri_id)
{
/* Intel command set (standard and extended) */
case 0x0001:
@@ -2490,7 +2490,7 @@ static int cfi_protect_check(struct flash_bank_s *bank)
if (cfi_info->qry[0] != 'Q')
return ERROR_FLASH_BANK_NOT_PROBED;
- switch(cfi_info->pri_id)
+ switch (cfi_info->pri_id)
{
case 1:
case 3:
@@ -2567,7 +2567,7 @@ static int cfi_info(struct flash_bank_s *bank, char *buf, int buf_size)
buf += printed;
buf_size -= printed;
- switch(cfi_info->pri_id)
+ switch (cfi_info->pri_id)
{
case 1:
case 3:
diff --git a/src/flash/ecos.c b/src/flash/ecos.c
index 4c90321..e19ac9b 100644
--- a/src/flash/ecos.c
+++ b/src/flash/ecos.c
@@ -392,7 +392,7 @@ static void command(flash_bank_t *bank, uint8_t cmd, uint8_t *cmd_buf)
static uint32_t ecosflash_address(struct flash_bank_s *bank, uint32_t address)
{
uint32_t retval = 0;
- switch(bank->bus_width)
+ switch (bank->bus_width)
{
case 4:
retval = address & 0xfffffffc;
diff --git a/src/flash/flash.c b/src/flash/flash.c
index aa3be95..02505b0 100644
--- a/src/flash/flash.c
+++ b/src/flash/flash.c
@@ -751,7 +751,7 @@ static int handle_flash_fill_command(struct command_context_s *cmd_ctx, char *cm
if (count == 0)
return ERROR_OK;
- switch(cmd[4])
+ switch (cmd[4])
{
case 'w':
wordsize=4;
@@ -767,7 +767,7 @@ static int handle_flash_fill_command(struct command_context_s *cmd_ctx, char *cm
}
chunk_count = MIN(count, (1024 / wordsize));
- switch(wordsize)
+ switch (wordsize)
{
case 4:
for(i = 0; i < chunk_count; i++)
diff --git a/src/flash/mflash.c b/src/flash/mflash.c
index 6400d3b..8518df1 100644
--- a/src/flash/mflash.c
+++ b/src/flash/mflash.c
@@ -232,7 +232,7 @@ static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time)
if (wait == mg_io_wait_bsy)
return ERROR_OK;
} else {
- switch(wait)
+ switch (wait)
{
case mg_io_wait_not_bsy:
return ERROR_OK;
diff --git a/src/flash/stm32x.c b/src/flash/stm32x.c
index 192ee26..dd1c1d8 100644
--- a/src/flash/stm32x.c
+++ b/src/flash/stm32x.c
@@ -848,7 +848,7 @@ static int stm32x_info(struct flash_bank_s *bank, char *buf, int buf_size)
buf += printed;
buf_size -= printed;
- switch(device_id >> 16)
+ switch (device_id >> 16)
{
case 0x0000:
snprintf(buf, buf_size, "A");
@@ -877,7 +877,7 @@ static int stm32x_info(struct flash_bank_s *bank, char *buf, int buf_size)
buf += printed;
buf_size -= printed;
- switch(device_id >> 16)
+ switch (device_id >> 16)
{
case 0x1000:
snprintf(buf, buf_size, "A");
@@ -894,7 +894,7 @@ static int stm32x_info(struct flash_bank_s *bank, char *buf, int buf_size)
buf += printed;
buf_size -= printed;
- switch(device_id >> 16)
+ switch (device_id >> 16)
{
case 0x1000:
snprintf(buf, buf_size, "A");
@@ -915,7 +915,7 @@ static int stm32x_info(struct flash_bank_s *bank, char *buf, int buf_size)
buf += printed;
buf_size -= printed;
- switch(device_id >> 16)
+ switch (device_id >> 16)
{
case 0x1000:
snprintf(buf, buf_size, "A");
diff --git a/src/helper/jim.c b/src/helper/jim.c
index 28c6512..84ac39b 100644
--- a/src/helper/jim.c
+++ b/src/helper/jim.c
@@ -246,7 +246,7 @@ static int JimStringMatch(const char *pattern, int patternLen,
const char *string, int stringLen, int nocase)
{
while (patternLen) {
- switch(pattern[0]) {
+ switch (pattern[0]) {
case '*':
while (pattern[1] == '*') {
pattern++;
@@ -1189,7 +1189,7 @@ int JimParseScript(struct JimParserCtx *pc)
pc->eof = 1;
return JIM_OK;
}
- switch(*(pc->p)) {
+ switch (*(pc->p)) {
case '\\':
if (*(pc->p+1) == '\n')
return JimParseSep(pc);
@@ -1427,7 +1427,7 @@ int JimParseStr(struct JimParserCtx *pc)
pc->tt = JIM_TT_ESC;
return JIM_OK;
}
- switch(*pc->p) {
+ switch (*pc->p) {
case '\\':
if (pc->state == JIM_PS_DEF &&
*(pc->p+1) == '\n') {
@@ -1518,9 +1518,9 @@ static int JimEscape(char *dest, const char *s, int slen)
slen = strlen(s);
for (i = 0; i < slen; i++) {
- switch(s[i]) {
+ switch (s[i]) {
case '\\':
- switch(s[i+1]) {
+ switch (s[i+1]) {
case 'a': *p++ = 0x7; i++; break;
case 'b': *p++ = 0x8; i++; break;
case 'f': *p++ = 0xc; i++; break;
@@ -1709,7 +1709,7 @@ int JimParseList(struct JimParserCtx *pc)
pc->eof = 1;
return JIM_OK;
}
- switch(*pc->p) {
+ switch (*pc->p) {
case ' ':
case '\n':
case '\t':
@@ -1757,7 +1757,7 @@ int JimParseListStr(struct JimParserCtx *pc)
pc->tt = JIM_TT_ESC;
return JIM_OK;
}
- switch(*pc->p) {
+ switch (*pc->p) {
case '\\':
pc->p++; pc->len--;
break;
@@ -2286,7 +2286,7 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr,
if ( fmtLen <= 0 ){
break;
}
- switch( *fmt ){
+ switch ( *fmt ){
/* terminals */
case 'b': /* binary - not all printfs() do this */
case 's': /* string */
@@ -2436,7 +2436,7 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr,
/* here we do the work */
/* actually - we make sprintf() do it for us */
- switch(*fmt) {
+ switch (*fmt) {
case 's':
*cp++ = 's';
*cp = 0;
@@ -5030,7 +5030,7 @@ static int ListElementQuotingType(const char *s, int len)
goto testbrace;
}
for (i = 0; i < len; i++) {
- switch(s[i]) {
+ switch (s[i]) {
case ' ':
case '$':
case '"':
@@ -5057,7 +5057,7 @@ testbrace:
s[len-1] == ']') return JIM_ELESTR_QUOTE;
level = 0;
for (i = 0; i < len; i++) {
- switch(s[i]) {
+ switch (s[i]) {
case '{': level++; break;
case '}': level--;
if (level < 0) return JIM_ELESTR_QUOTE;
@@ -5073,7 +5073,7 @@ testbrace:
if (level == 0) {
if (!trySimple) return JIM_ELESTR_BRACE;
for (i = 0; i < len; i++) {
- switch(s[i]) {
+ switch (s[i]) {
case ' ':
case '$':
case '"':
@@ -5164,7 +5164,7 @@ void UpdateStringOfList(struct Jim_Obj *objPtr)
const char *strRep = Jim_GetString(ele[i], &len);
char *q;
- switch(quotingType[i]) {
+ switch (quotingType[i]) {
case JIM_ELESTR_SIMPLE:
memcpy(p, strRep, len);
p += len;
@@ -5739,7 +5739,7 @@ void UpdateStringOfDict(struct Jim_Obj *objPtr)
const char *strRep = Jim_GetString(objv[i], &len);
char *q;
- switch(quotingType[i]) {
+ switch (quotingType[i]) {
case JIM_ELESTR_SIMPLE:
memcpy(p, strRep, len);
p += len;
@@ -6291,7 +6291,7 @@ int JimParseExpression(struct JimParserCtx *pc)
pc->eof = 1;
return JIM_OK;
}
- switch(*(pc->p)) {
+ switch (*(pc->p)) {
case '(':
pc->tstart = pc->tend = pc->p;
pc->tline = pc->linenr;
@@ -6508,7 +6508,7 @@ static int ExprCheckCorrectness(ExprByteCode *expr)
* and make sure at the end of the program there is
* a single result on the stack. */
for (i = 0; i < expr->len; i++) {
- switch(expr->opcode[i]) {
+ switch (expr->opcode[i]) {
case JIM_EXPROP_NUMBER:
case JIM_EXPROP_STRING:
case JIM_EXPROP_SUBST:
@@ -6624,7 +6624,7 @@ static void ExprMakeLazy(Jim_Interp *interp, ExprByteCode *expr)
leftindex = index-1;
arity = 1;
while (arity) {
- switch(expr->opcode[leftindex]) {
+ switch (expr->opcode[leftindex]) {
case JIM_EXPROP_NUMBER:
case JIM_EXPROP_COMMAND:
case JIM_EXPROP_VARIABLE:
@@ -6710,7 +6710,7 @@ int SetExprFromAny(Jim_Interp *interp, struct Jim_Obj *objPtr)
Jim_Free(token);
break;
}
- switch(type) {
+ switch (type) {
case JIM_TT_STR:
ExprObjAddInstr(interp, expr, JIM_EXPROP_STRING, token, len);
break;
@@ -6949,7 +6949,7 @@ int Jim_EvalExpression(Jim_Interp *interp, Jim_Obj *exprObjPtr,
}
Jim_DecrRefCount(interp, A);
Jim_DecrRefCount(interp, B);
- switch(expr->opcode[i]) {
+ switch (expr->opcode[i]) {
case JIM_EXPROP_ADD: wC = wA+wB; break;
case JIM_EXPROP_SUB: wC = wA-wB; break;
case JIM_EXPROP_MUL: wC = wA*wB; break;
@@ -7040,7 +7040,7 @@ trydouble:
}
Jim_DecrRefCount(interp, A);
Jim_DecrRefCount(interp, B);
- switch(expr->opcode[i]) {
+ switch (expr->opcode[i]) {
case JIM_EXPROP_ROTL:
case JIM_EXPROP_ROTR:
case JIM_EXPROP_LSHIFT:
@@ -7097,7 +7097,7 @@ trydouble:
retry_as_string:
sA = Jim_GetString(A, &Alen);
sB = Jim_GetString(B, &Blen);
- switch(opcode) {
+ switch (opcode) {
case JIM_EXPROP_STREQ:
if (Alen == Blen && memcmp(sA, sB, Alen) ==0)
wC = 1;
@@ -7134,7 +7134,7 @@ retry_as_string:
goto trydouble_unary;
}
Jim_DecrRefCount(interp, A);
- switch(expr->opcode[i]) {
+ switch (expr->opcode[i]) {
case JIM_EXPROP_NOT: wC = !wA; break;
case JIM_EXPROP_BITNOT: wC = ~wA; break;
case JIM_EXPROP_LOGICAND_RIGHT:
@@ -7155,7 +7155,7 @@ trydouble_unary:
goto err;
}
Jim_DecrRefCount(interp, A);
- switch(expr->opcode[i]) {
+ switch (expr->opcode[i]) {
case JIM_EXPROP_NOT: dC = !dA; break;
case JIM_EXPROP_LOGICAND_RIGHT:
case JIM_EXPROP_LOGICOR_RIGHT: dC = (dA != 0); break;
@@ -8454,7 +8454,7 @@ int Jim_InterpolateTokens(Jim_Interp *interp, ScriptToken *token,
/* Compute every token forming the argument
* in the intv objects vector. */
for (i = 0; i < tokens; i++) {
- switch(token[i].type) {
+ switch (token[i].type) {
case JIM_TT_ESC:
case JIM_TT_STR:
intv[i] = token[i].objPtr;
@@ -8628,7 +8628,7 @@ int Jim_EvalObj(Jim_Interp *interp, Jim_Obj *scriptObjPtr)
if (tokens == 1) {
/* Fast path if the token does not
* need interpolation */
- switch(token[i].type) {
+ switch (token[i].type) {
case JIM_TT_ESC:
case JIM_TT_STR:
argv[j] = token[i].objPtr;
@@ -9020,7 +9020,7 @@ static int JimParseSubst(struct JimParserCtx *pc, int flags)
pc->eof = 1;
return JIM_OK;
}
- switch(*pc->p) {
+ switch (*pc->p) {
case '[':
retval = JimParseCmd(pc);
if (flags & JIM_SUBST_NOCMD) {
@@ -9170,7 +9170,7 @@ int Jim_SubstObj(Jim_Interp *interp, Jim_Obj *substObjPtr,
for (i = 0; i < len; i++) {
Jim_Obj *objPtr;
- switch(token[i].type) {
+ switch (token[i].type) {
case JIM_TT_STR:
case JIM_TT_ESC:
Jim_AppendObj(interp, resObjPtr, token[i].objPtr);
@@ -9773,7 +9773,7 @@ static int Jim_WhileCoreCommand(Jim_Interp *interp, int argc,
if ((expr = Jim_GetExpression(interp, argv[1])) == NULL) goto noopt;
if (expr->len <= 0 || expr->len > 3) goto noopt;
- switch(expr->len) {
+ switch (expr->len) {
case 1:
if (expr->opcode[0] != JIM_EXPROP_VARIABLE &&
expr->opcode[0] != JIM_EXPROP_NUMBER)
@@ -9789,7 +9789,7 @@ static int Jim_WhileCoreCommand(Jim_Interp *interp, int argc,
(expr->opcode[1] != JIM_EXPROP_NUMBER &&
expr->opcode[1] != JIM_EXPROP_VARIABLE))
goto noopt;
- switch(expr->opcode[2]) {
+ switch (expr->opcode[2]) {
case JIM_EXPROP_LT:
case JIM_EXPROP_LTE:
case JIM_EXPROP_GT:
@@ -9834,7 +9834,7 @@ static int Jim_WhileCoreCommand(Jim_Interp *interp, int argc,
}
if (!wideValue) break;
if ((retval = Jim_EvalObj(interp, argv[2])) != JIM_OK) {
- switch(retval) {
+ switch (retval) {
case JIM_BREAK:
if (varAObjPtr)
Jim_DecrRefCount(interp, varAObjPtr);
@@ -9885,7 +9885,7 @@ static int Jim_WhileCoreCommand(Jim_Interp *interp, int argc,
goto noopt;
}
}
- switch(cmpType) {
+ switch (cmpType) {
case JIM_EXPROP_LT:
cmpRes = wideValueA < wideValueB; break;
case JIM_EXPROP_LTE:
@@ -9901,7 +9901,7 @@ static int Jim_WhileCoreCommand(Jim_Interp *interp, int argc,
}
if (!cmpRes) break;
if ((retval = Jim_EvalObj(interp, argv[2])) != JIM_OK) {
- switch(retval) {
+ switch (retval) {
case JIM_BREAK:
Jim_DecrRefCount(interp, varAObjPtr);
if (varBObjPtr)
@@ -9941,7 +9941,7 @@ noopt:
return retval;
if (!boolean) break;
if ((retval = Jim_EvalObj(interp, argv[2])) != JIM_OK) {
- switch(retval) {
+ switch (retval) {
case JIM_BREAK:
goto out;
break;
@@ -10078,7 +10078,7 @@ static int Jim_ForCoreCommand(Jim_Interp *interp, int argc,
}
/* Eval body */
if ((retval = Jim_EvalObj(interp, argv[4])) != JIM_OK) {
- switch(retval) {
+ switch (retval) {
case JIM_BREAK:
if (stopVarNamePtr)
Jim_DecrRefCount(interp, stopVarNamePtr);
@@ -10147,7 +10147,7 @@ testcond:
if (!boolean) break;
/* Eval body */
if ((retval = Jim_EvalObj(interp, argv[4])) != JIM_OK) {
- switch(retval) {
+ switch (retval) {
case JIM_BREAK:
goto out;
break;
@@ -10161,7 +10161,7 @@ testcond:
evalnext:
/* Eval next */
if ((retval = Jim_EvalObj(interp, argv[3])) != JIM_OK) {
- switch(retval) {
+ switch (retval) {
case JIM_BREAK:
goto out;
break;
@@ -10615,7 +10615,7 @@ static int Jim_LsortCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const arg
if (Jim_GetEnum(interp, argv[i], options, &option, "option", JIM_ERRMSG)
!= JIM_OK)
return JIM_ERR;
- switch(option) {
+ switch (option) {
case OPT_ASCII: lsortType = JIM_LSORT_ASCII; break;
case OPT_NOCASE: lsortType = JIM_LSORT_NOCASE; break;
case OPT_INCREASING: decreasing = 0; break;
@@ -10623,7 +10623,7 @@ static int Jim_LsortCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const arg
}
}
if (decreasing) {
- switch(lsortType) {
+ switch (lsortType) {
case JIM_LSORT_ASCII: lsortType = JIM_LSORT_ASCII_DECR; break;
case JIM_LSORT_NOCASE: lsortType = JIM_LSORT_NOCASE_DECR; break;
}
@@ -10800,7 +10800,7 @@ static int Jim_DebugCoreCommand(Jim_Interp *interp, int argc,
const char *type;
Jim_ExprOperator *op;
- switch(expr->opcode[i]) {
+ switch (expr->opcode[i]) {
case JIM_EXPROP_NUMBER: type = "number"; break;
case JIM_EXPROP_COMMAND: type = "command"; break;
case JIM_EXPROP_VARIABLE: type = "variable"; break;
diff --git a/src/helper/jim.h b/src/helper/jim.h
index e102eb7..b7fae59 100644
--- a/src/helper/jim.h
+++ b/src/helper/jim.h
@@ -992,7 +992,7 @@ typedef struct jim_getopt {
* return e;
* }
*
- * switch( n->value ){
+ * switch ( n->value ){
* case ALIVE:
* printf("Option ALIVE specified\n");
* break;
@@ -1112,7 +1112,7 @@ JIM_STATIC int JIM_API( Jim_GetOpt_Nvp)( Jim_GetOptInfo *goi, const Jim_Nvp *loo
* return e;
* }
*
- * switch( n->value ){
+ * switch ( n->value ){
* case OPT_SEX:
* // handle: --sex male|female|lots|needmore
* e = Jim_GetOpt_Nvp( &goi, &nvp_sex, &n );
diff --git a/src/jtag/interface.c b/src/jtag/interface.c
index be85f98..e35d355 100644
--- a/src/jtag/interface.c
+++ b/src/jtag/interface.c
@@ -77,7 +77,7 @@ int tap_move_ndx( tap_state_t astate )
int ndx;
- switch( astate )
+ switch ( astate )
{
case TAP_RESET: ndx = 0; break;
case TAP_DRSHIFT: ndx = 2; break;
@@ -209,10 +209,10 @@ bool tap_is_state_stable(tap_state_t astate)
{
bool is_stable;
- /* A switch() is used because it is symbol dependent
+ /* A switch () is used because it is symbol dependent
(not value dependent like an array), and can also check bounds.
*/
- switch( astate )
+ switch ( astate )
{
case TAP_RESET:
case TAP_IDLE:
@@ -331,7 +331,7 @@ const char* tap_state_name(tap_state_t state)
{
const char* ret;
- switch( state )
+ switch ( state )
{
case TAP_RESET: ret = "RESET"; break;
case TAP_IDLE: ret = "RUN/IDLE"; break;
diff --git a/src/jtag/rlink/rlink.c b/src/jtag/rlink/rlink.c
index 3d735d6..aa6eb6c 100644
--- a/src/jtag/rlink/rlink.c
+++ b/src/jtag/rlink/rlink.c
@@ -363,7 +363,7 @@ dtc_load_from_buffer(
exit(1);
}
- switch(header->type) {
+ switch (header->type) {
case DTCLOAD_COMMENT:
break;
@@ -1243,7 +1243,7 @@ rlink_scan(
/* chunk_bits is a multiple of 8, so there are no rounding issues. */
chunk_bytes = chunk_bits / 8;
- switch(type) {
+ switch (type) {
case SCAN_IN:
x = DTC_CMD_SHIFT_TDO_BYTES(chunk_bytes);
break;
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index 7515363..c0498ab 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -374,7 +374,7 @@ static int jim_newtap_cmd( Jim_GetOptInfo *goi )
return e;
}
LOG_DEBUG("Processing option: %s", n->name );
- switch( n->value ){
+ switch ( n->value ){
case NTAP_OPT_ENABLED:
pTap->disabled_after_reset = false;
break;
@@ -414,7 +414,7 @@ static int jim_newtap_cmd( Jim_GetOptInfo *goi )
Jim_SetResult_sprintf( goi->interp, "option: %s bad parameter", n->name );
return e;
}
- switch(n->value){
+ switch (n->value){
case NTAP_OPT_IRLEN:
if (w > (jim_wide) (8 * sizeof(pTap->ir_capture_value)))
LOG_WARNING("huge IR length %d", (int) w);
@@ -440,7 +440,7 @@ static int jim_newtap_cmd( Jim_GetOptInfo *goi )
reqbits &= (~(NTREQ_IRCAPTURE));
break;
}
- } /* switch(n->value) */
+ } /* switch (n->value) */
} /* while ( goi->argc ) */
/* default is enabled-after-reset */
@@ -540,7 +540,7 @@ static int jim_jtag_command( Jim_Interp *interp, int argc, Jim_Obj *const *argv
return e;
}
Jim_SetEmptyResult( goi.interp );
- switch( n->value ){
+ switch ( n->value ){
case JTAG_CMD_INTERFACE:
/* return the name of the interface */
/* TCL code might need to know the exact type... */
diff --git a/src/jtag/vsllink.c b/src/jtag/vsllink.c
index 0b52ab1..b30e324 100644
--- a/src/jtag/vsllink.c
+++ b/src/jtag/vsllink.c
@@ -362,7 +362,7 @@ static int vsllink_execute_queue(void)
case JTAG_STABLECLOCKS:
DEBUG_JTAG_IO("add %d clocks", cmd->cmd.stableclocks->num_cycles);
- switch(tap_get_state())
+ switch (tap_get_state())
{
case TAP_RESET:
// tms should be '1' to stay in TAP_RESET mode
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 2720068..bf11be1 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -188,7 +188,7 @@ int gdb_get_char(connection_t *connection, int* next_char)
#ifdef _WIN32
errno = WSAGetLastError();
- switch(errno)
+ switch (errno)
{
case WSAEWOULDBLOCK:
usleep(1000);
@@ -204,7 +204,7 @@ int gdb_get_char(connection_t *connection, int* next_char)
exit(-1);
}
#else
- switch(errno)
+ switch (errno)
{
case EAGAIN:
usleep(1000);
@@ -1964,7 +1964,7 @@ int gdb_v_packet(connection_t *connection, target_t *target, char *packet, int p
int gdb_detach(connection_t *connection, target_t *target)
{
- switch( detach_mode )
+ switch ( detach_mode )
{
case GDB_DETACH_RESUME:
target_handle_event( target, TARGET_EVENT_OLD_pre_resume );
diff --git a/src/svf/svf.c b/src/svf/svf.c
index d414ce3..833b029 100644
--- a/src/svf/svf.c
+++ b/src/svf/svf.c
@@ -273,7 +273,7 @@ static const char* tap_state_svf_name(tap_state_t state)
{
const char* ret;
- switch( state )
+ switch ( state )
{
case TAP_RESET: ret = "RESET"; break;
case TAP_IDLE: ret = "IDLE"; break;
@@ -507,7 +507,7 @@ static int svf_read_command_from_file(int fd)
while (!cmd_ok && (read(fd, &ch, 1) > 0) )
{
- switch(ch)
+ switch (ch)
{
case '!':
slash = 0;
@@ -578,7 +578,7 @@ static int svf_parse_cmd_string(char *str, int len, char **argus, int *num_of_ar
while (pos < len)
{
- switch(str[pos])
+ switch (str[pos])
{
case '\n':
case '\r':
@@ -832,7 +832,7 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str)
}
command = svf_find_string_in_array(argus[0], (char **)svf_command_name, dimof(svf_command_name));
- switch(command)
+ switch (command)
{
case ENDDR:
case ENDIR:
diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c
index bdd8a60..9396ee0 100644
--- a/src/target/arm_disassembler.c
+++ b/src/target/arm_disassembler.c
@@ -1332,7 +1332,7 @@ int evaluate_b_bl_blx_thumb(uint16_t opcode, uint32_t address, arm_instruction_t
target_address = address + 4 + (offset<<1);
- switch(opc)
+ switch (opc)
{
/* unconditional branch */
case 0:
@@ -1416,7 +1416,7 @@ int evaluate_shift_imm_thumb(uint16_t opcode, uint32_t address, arm_instruction_
uint8_t opc = (opcode >> 11) & 0x3;
char *mnemonic = NULL;
- switch(opc)
+ switch (opc)
{
case 0:
instruction->type = ARM_MOV;
@@ -1465,7 +1465,7 @@ int evaluate_data_proc_imm_thumb(uint16_t opcode, uint32_t address, arm_instruct
instruction->info.data_proc.variant = 0; /*immediate*/
instruction->info.data_proc.shifter_operand.immediate.immediate = imm;
- switch(opc)
+ switch (opc)
{
case 0:
instruction->type = ARM_MOV;
@@ -1679,7 +1679,7 @@ int evaluate_load_store_reg_thumb(uint16_t opcode, uint32_t address, arm_instruc
uint8_t opc = (opcode >> 9) & 0x7;
char *mnemonic = NULL;
- switch(opc)
+ switch (opc)
{
case 0:
instruction->type = ARM_STR;
diff --git a/src/target/image.c b/src/target/image.c
index c6f3df5..286a221 100644
--- a/src/target/image.c
+++ b/src/target/image.c
@@ -533,7 +533,7 @@ static int image_mot_buffer_complete(image_t *image)
}
else if (record_type >= 1 && record_type <= 3)
{
- switch( record_type )
+ switch ( record_type )
{
case 1:
/* S1 - 16 bit address data record */
diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c
index 71dab5d..c1b279b 100644
--- a/src/target/mips_m4k.c
+++ b/src/target/mips_m4k.c
@@ -765,7 +765,7 @@ int mips_m4k_read_memory(struct target_s *target, uint32_t address, uint32_t siz
for(i = 0; i < (count*size); i += size)
{
- switch(size)
+ switch (size)
{
case 4:
t32 = le_to_h_u32(&buffer[i]);
@@ -810,7 +810,7 @@ int mips_m4k_write_memory(struct target_s *target, uint32_t address, uint32_t si
for(i = 0; i < (count*size); i += size)
{
- switch(size)
+ switch (size)
{
case 4:
t32 = be_to_h_u32(&buffer[i]);
diff --git a/src/target/target.c b/src/target/target.c
index 10e8660..a427c66 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2699,7 +2699,7 @@ static int handle_wp_command(struct command_context_s *cmd_ctx, char *cmd, char
return retval;
// fall through
case 3:
- switch(args[2][0])
+ switch (args[2][0])
{
case 'r':
type = WPT_READ;
@@ -3460,7 +3460,7 @@ static int target_configure( Jim_GetOptInfo *goi, target_t *target )
Jim_GetOpt_NvpUnknown( goi, nvp_config_opts, 0 );
return e;
}
- switch( n->value ){
+ switch ( n->value ){
case TCFG_TYPE:
/* not setable */
if ( goi->isconfigure ){
@@ -3763,7 +3763,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
/* Assume blank result */
Jim_SetEmptyResult( goi.interp );
- switch( n->value ){
+ switch ( n->value ){
case TS_CMD_CONFIGURE:
if ( goi.argc < 2 ){
Jim_WrongNumArgs( goi.interp, goi.argc, goi.argv, "missing: -option VALUE ...");
@@ -3815,7 +3815,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
c = 1;
}
- switch( n->value ){
+ switch ( n->value ){
case TS_CMD_MWW:
target_buffer_set_u32( target, target_buf, b );
b = 4;
@@ -3866,7 +3866,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
c = 1;
}
b = 1; /* shut up gcc */
- switch( n->value ){
+ switch ( n->value ){
case TS_CMD_MDW:
b = 4;
break;
@@ -3893,7 +3893,7 @@ 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 ){
+ switch ( b ){
case 4:
for( x = 0 ; (x < 16) && (x < y) ; x += 4 ){
z = target_buffer_get_u32( target, &(target_buf[ x * 4 ]) );
@@ -4296,7 +4296,7 @@ static int jim_target( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
return r;
}
- switch(x){
+ switch (x){
default:
Jim_Panic(goi.interp,"Why am I here?");
return JIM_ERR;
diff --git a/src/target/xscale.c b/src/target/xscale.c
index 6c04b97..1e20afa 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -3610,7 +3610,7 @@ int xscale_handle_cp15(command_context_t *cmd_ctx, char *cmd, char **args, int a
{
reg_no = strtoul(args[0], NULL, 0);
/*translate from xscale cp15 register no to openocd register*/
- switch(reg_no)
+ switch (reg_no)
{
case 0:
reg_no = XSCALE_MAINID;
diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c
index 1c21e92..f0213c3 100644
--- a/src/xsvf/xsvf.c
+++ b/src/xsvf/xsvf.c
@@ -133,7 +133,7 @@ static tap_state_t xsvf_to_tap( int xsvf_state )
{
tap_state_t ret;
- switch( xsvf_state )
+ switch ( xsvf_state )
{
case XSV_RESET: ret = TAP_RESET; break;
case XSV_IDLE: ret = TAP_IDLE; break;
@@ -890,7 +890,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
break;
}
- switch( trst_mode )
+ switch ( trst_mode )
{
case XTRST_ON:
jtag_add_reset(1, 0);