forked from auracaster/openocd
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:
@@ -5724,7 +5724,7 @@ static int target_create(struct jim_getopt_info *goi)
|
||||
}
|
||||
/* now does target type exist */
|
||||
for (x = 0 ; target_types[x] ; x++) {
|
||||
if (0 == strcmp(cp, target_types[x]->name)) {
|
||||
if (strcmp(cp, target_types[x]->name) == 0) {
|
||||
/* found */
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user