The kernel (and iproute2) don't use the if (NULL == x) style
and instead prefer if (!x)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
parse_rtattr_nested(tb, tot_acts, arg);
- if (tab_flush && NULL != tb[0] && NULL == tb[1])
+ if (tab_flush && tb[0] && !tb[1])
return tc_print_action_flush(f, tb[0]);
open_json_array(PRINT_JSON, "actions");
int i;
for (i = 0; i < rargc; i++) {
- if (NULL == argv[i] || 0 == strcmp(argv[i], "action")) {
+ if (!argv[i] || strcmp(argv[i], "action") == 0)
break;
- }
}
iargc = argc = i;
}
int i;
for (i = 0; i < rargc; i++) {
- if (NULL == argv[i] || 0 == strcmp(argv[i], "action")) {
+ if (!argv[i] || strcmp(argv[i], "action") == 0)
break;
- }
}
iargc = argc = i;
}
if (tb[TCA_STATS2]) {
print_tcstats2_attr(fp, tb[TCA_STATS2], prefix, xstats);
- if (xstats && NULL == *xstats)
+ if (xstats && !*xstats)
goto compat_xstats;
return;
}