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:
@@ -145,7 +145,7 @@ int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct time
|
||||
struct timeval tvslice;
|
||||
int retcode;
|
||||
|
||||
#define SAFE_FD_ISSET(fd, set) (set != NULL && FD_ISSET(fd, set))
|
||||
#define SAFE_FD_ISSET(fd, set) (set && FD_ISSET(fd, set))
|
||||
|
||||
/* calculate how long we need to wait in milliseconds */
|
||||
if (!tv)
|
||||
|
||||
Reference in New Issue
Block a user