summaryrefslogtreecommitdiffstats
path: root/libsmartcols
diff options
context:
space:
mode:
authorSami Kerola2017-03-10 20:50:14 +0100
committerSami Kerola2017-03-17 22:22:26 +0100
commit71f08e9706697b5ca001bc42325b574f0dea0923 (patch)
treeeba294f81c39c82d458a0425f64a9da19276e98e /libsmartcols
parentlibsmartcols: fix test variable shadowing (diff)
downloadkernel-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 'libsmartcols')
-rw-r--r--libsmartcols/samples/fromfile.c24
-rw-r--r--libsmartcols/samples/title.c6
-rw-r--r--libsmartcols/samples/tree.c20
3 files changed, 25 insertions, 25 deletions
diff --git a/libsmartcols/samples/fromfile.c b/libsmartcols/samples/fromfile.c
index 1a90e2d4b..674f01206 100644
--- a/libsmartcols/samples/fromfile.c
+++ b/libsmartcols/samples/fromfile.c
@@ -222,18 +222,18 @@ int main(int argc, char *argv[])
int parent_col = -1, id_col = -1;
static const struct option longopts[] = {
- { "maxout", 0, 0, 'm' },
- { "column", 1, 0, 'c' },
- { "nlines", 1, 0, 'n' },
- { "width", 1, 0, 'w' },
- { "tree-parent-column", 1, 0, 'p' },
- { "tree-id-column", 1, 0, 'i' },
- { "json", 0, 0, 'J' },
- { "raw", 0, 0, 'r' },
- { "export", 0, 0, 'E' },
- { "colsep", 1, 0, 'C' },
- { "help", 0, 0, 'h' },
- { NULL, 0, 0, 0 },
+ { "maxout", 0, NULL, 'm' },
+ { "column", 1, NULL, 'c' },
+ { "nlines", 1, NULL, 'n' },
+ { "width", 1, NULL, 'w' },
+ { "tree-parent-column", 1, NULL, 'p' },
+ { "tree-id-column", 1, NULL, 'i' },
+ { "json", 0, NULL, 'J' },
+ { "raw", 0, NULL, 'r' },
+ { "export", 0, NULL, 'E' },
+ { "colsep", 1, NULL, 'C' },
+ { "help", 0, NULL, 'h' },
+ { NULL, 0, NULL, 0 },
};
static const ul_excl_t excl[] = { /* rows and cols in ASCII order */
diff --git a/libsmartcols/samples/title.c b/libsmartcols/samples/title.c
index 852316095..2d33b563a 100644
--- a/libsmartcols/samples/title.c
+++ b/libsmartcols/samples/title.c
@@ -60,9 +60,9 @@ int main(int argc, char *argv[])
int c;
static const struct option longopts[] = {
- { "maxout", 0, 0, 'm' },
- { "width", 1, 0, 'w' },
- { NULL, 0, 0, 0 },
+ { "maxout", 0, NULL, 'm' },
+ { "width", 1, NULL, 'w' },
+ { NULL, 0, NULL, 0 },
};
setlocale(LC_ALL, ""); /* just to have enable UTF8 chars */
diff --git a/libsmartcols/samples/tree.c b/libsmartcols/samples/tree.c
index c809b2d85..fcb175135 100644
--- a/libsmartcols/samples/tree.c
+++ b/libsmartcols/samples/tree.c
@@ -162,16 +162,16 @@ int main(int argc, char *argv[])
static const struct option longopts[] = {
- { "ascii", 0, 0, 'i' },
- { "csv", 0, 0, 'c' },
- { "list", 0, 0, 'l' },
- { "noheadings", 0, 0, 'n' },
- { "pairs", 0, 0, 'p' },
- { "json", 0, 0, 'J' },
- { "raw", 0, 0, 'r' },
- { "range-start",1, 0, 'S' },
- { "range-end", 1, 0, 'E' },
- { NULL, 0, 0, 0 },
+ { "ascii", 0, NULL, 'i' },
+ { "csv", 0, NULL, 'c' },
+ { "list", 0, NULL, 'l' },
+ { "noheadings", 0, NULL, 'n' },
+ { "pairs", 0, NULL, 'p' },
+ { "json", 0, NULL, 'J' },
+ { "raw", 0, NULL, 'r' },
+ { "range-start",1, NULL, 'S' },
+ { "range-end", 1, NULL, 'E' },
+ { NULL, 0, NULL, 0 },
};
setlocale(LC_ALL, ""); /* just to have enable UTF8 chars */