openocd: fix Yoda conditions with checkpatch
The new checkpatch can automatically fix the code, but this feature is still error prone and not complete. Patch generated automatically through the new checkpatch with flags "--types CONSTANT_COMPARISON --fix-inplace". Some Yoda condition is detected by checkpatch but not fixed; it will be fixed manually in a following commit. Change-Id: Ifaaa1159e63dbd1db6aa3c017125df9874fa9703 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6355 Tested-by: jenkins
This commit is contained in:
@@ -152,7 +152,7 @@ int rtos_create(struct jim_getopt_info *goi, struct target *target)
|
||||
}
|
||||
|
||||
for (x = 0; rtos_types[x]; x++)
|
||||
if (0 == strcmp(cp, rtos_types[x]->name))
|
||||
if (strcmp(cp, rtos_types[x]->name) == 0)
|
||||
return os_alloc_create(target, rtos_types[x]);
|
||||
|
||||
Jim_SetResultFormatted(goi->interp, "Unknown RTOS type %s, try one of: ", cp);
|
||||
|
||||
Reference in New Issue
Block a user