- Replace 'switch(' with 'switch ('.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2359 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
zwelch 2009-06-23 22:36:56 +00:00
parent 50c086ffb9
commit 9af5e445b7
19 changed files with 96 additions and 96 deletions

View File

@ -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:

View File

@ -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;

View File

@ -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++)

View File

@ -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;

View File

@ -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");

View File

@ -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;

View File

@ -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 );

View File

@ -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;

View File

@ -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;

View File

@ -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... */

View File

@ -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

View File

@ -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 );

View File

@ -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:

View File

@ -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;

View File

@ -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 */

View File

@ -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]);

View File

@ -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;

View File

@ -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;

View File

@ -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);