diff options
author | Sami Kerola | 2017-03-10 20:50:14 +0100 |
---|---|---|
committer | Sami Kerola | 2017-03-17 22:22:26 +0100 |
commit | 71f08e9706697b5ca001bc42325b574f0dea0923 (patch) | |
tree | eba294f81c39c82d458a0425f64a9da19276e98e /lib | |
parent | libsmartcols: fix test variable shadowing (diff) | |
download | kernel-qcow2-util-linux-71f08e9706697b5ca001bc42325b574f0dea0923.tar.gz kernel-qcow2-util-linux-71f08e9706697b5ca001bc42325b574f0dea0923.tar.xz kernel-qcow2-util-linux-71f08e9706697b5ca001bc42325b574f0dea0923.zip |
tests: do not use plain 0 as NULL [smatch scan]
Likewise commit 87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/colors.c | 10 | ||||
-rw-r--r-- | lib/cpuset.c | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/colors.c b/lib/colors.c index dda617057..b2742e4e9 100644 --- a/lib/colors.c +++ b/lib/colors.c @@ -830,11 +830,11 @@ int colormode_or_err(const char *str, const char *errmsg) int main(int argc, char *argv[]) { static const struct option longopts[] = { - { "mode", required_argument, 0, 'm' }, - { "color", required_argument, 0, 'c' }, - { "color-scheme", required_argument, 0, 'C' }, - { "name", required_argument, 0, 'n' }, - { NULL, 0, 0, 0 } + { "mode", required_argument, NULL, 'm' }, + { "color", required_argument, NULL, 'c' }, + { "color-scheme", required_argument, NULL, 'C' }, + { "name", required_argument, NULL, 'n' }, + { NULL, 0, NULL, 0 } }; int c, mode = UL_COLORMODE_UNDEF; /* default */ const char *color = "red", *name = NULL, *color_scheme = NULL; diff --git a/lib/cpuset.c b/lib/cpuset.c index 89cd0f14c..fbe99e2a5 100644 --- a/lib/cpuset.c +++ b/lib/cpuset.c @@ -333,10 +333,10 @@ int main(int argc, char *argv[]) int ncpus = 2048, rc, c; static const struct option longopts[] = { - { "ncpus", 1, 0, 'n' }, - { "mask", 1, 0, 'm' }, - { "range", 1, 0, 'r' }, - { NULL, 0, 0, 0 } + { "ncpus", 1, NULL, 'n' }, + { "mask", 1, NULL, 'm' }, + { "range", 1, NULL, 'r' }, + { NULL, 0, NULL, 0 } }; while ((c = getopt_long(argc, argv, "n:m:r:", longopts, NULL)) != -1) { |