openocd: remove NULL comparisons with checkpatch [1/2]
Patch generated automatically through the new checkpatch with flags "--types COMPARISON_TO_NULL --fix-inplace". This only fixes the comparisons if (symbol == NULL) if (symbol != NULL) The case of NULL on the left side of the comparison is not tested. Some automatic fix is incorrect and has been massaged by hands: - if (*psig == NULL) + if (*!psig) changed as + if (!*psig) Change-Id: If4a1e2b4e547e223532e8e3d9da89bf9cb382ce6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6351 Tested-by: jenkins
This commit is contained in:
@@ -147,7 +147,7 @@ int hl_interface_init_reset(void)
|
||||
|
||||
static int hl_interface_khz(int khz, int *jtag_speed)
|
||||
{
|
||||
if (hl_if.layout->api->speed == NULL)
|
||||
if (!hl_if.layout->api->speed)
|
||||
return ERROR_OK;
|
||||
|
||||
*jtag_speed = hl_if.layout->api->speed(hl_if.handle, khz, true);
|
||||
@@ -162,7 +162,7 @@ static int hl_interface_speed_div(int speed, int *khz)
|
||||
|
||||
static int hl_interface_speed(int speed)
|
||||
{
|
||||
if (hl_if.layout->api->speed == NULL)
|
||||
if (!hl_if.layout->api->speed)
|
||||
return ERROR_OK;
|
||||
|
||||
if (!hl_if.handle) {
|
||||
|
||||
Reference in New Issue
Block a user