openocd: manually fix Yoda conditions
Fix the remaining Yoda conditions, detected by checkpatch but not fixed automatically. While there, apply minor style changes. Change-Id: I6e1978b89c4d56a20aceaeb2b52968eb6384432a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6356 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-by: Xiang W <wxjstz@126.com>
This commit is contained in:
@@ -296,9 +296,9 @@ COMMAND_HANDLER(tms470_handle_flash_keyset_command)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
int start = (0 == strncmp(CMD_ARGV[i], "0x", 2)) ? 2 : 0;
|
||||
int start = (strncmp(CMD_ARGV[i], "0x", 2) == 0) ? 2 : 0;
|
||||
|
||||
if (1 != sscanf(&CMD_ARGV[i][start], "%" SCNx32 "", &flash_keys[i])) {
|
||||
if (sscanf(&CMD_ARGV[i][start], "%" SCNx32 "", &flash_keys[i]) != 1) {
|
||||
command_print(CMD, "could not process flash key %s",
|
||||
CMD_ARGV[i]);
|
||||
LOG_ERROR("could not process flash key %s", CMD_ARGV[i]);
|
||||
|
||||
Reference in New Issue
Block a user