helper: with pointers, use NULL instead of 0
Don't compare pointers with 0, use NULL when needed. Don't assign pointer to 0, use NULL. Don't pass 0 ad pointer argument, pass NULL. Detected through 'sparse' tool. Change-Id: I3f867cb9c0903f6e396311e7b3970ee5fb3a4231 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7597 Tested-by: jenkins
This commit is contained in:
@@ -26,7 +26,7 @@ const char *jep106_table_manufacturer(unsigned int bank, unsigned int id)
|
||||
/* index is zero based */
|
||||
id--;
|
||||
|
||||
if (bank >= ARRAY_SIZE(jep106) || jep106[bank][id] == 0)
|
||||
if (bank >= ARRAY_SIZE(jep106) || !jep106[bank][id])
|
||||
return "<unknown>";
|
||||
|
||||
return jep106[bank][id];
|
||||
|
||||
Reference in New Issue
Block a user