openocd: manually remove NULL comparisons
For the remaining NULL comparisons, remove then manually. While there, make more readable a loop, by moving the assigment out of the loop condition. Change-Id: I44193aaa95813156a3a79c16b80e1ad333dc1eaf Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6353 Tested-by: jenkins
This commit is contained in:
@@ -1276,7 +1276,7 @@ COMMAND_HANDLER(handle_flash_bank_command)
|
||||
}
|
||||
|
||||
/* check the flash bank name is unique */
|
||||
if (get_flash_bank_by_name_noprobe(bank_name) != NULL) {
|
||||
if (get_flash_bank_by_name_noprobe(bank_name)) {
|
||||
/* flash bank name already exists */
|
||||
LOG_ERROR("flash bank name '%s' already exists", bank_name);
|
||||
return ERROR_FAIL;
|
||||
|
||||
Reference in New Issue
Block a user