summaryrefslogtreecommitdiffstats
path: root/sys-utils/lsipc.c
diff options
context:
space:
mode:
authorSami Kerola2017-02-11 21:23:26 +0100
committerKarel Zak2017-02-20 12:58:49 +0100
commit87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3 (patch)
tree513541cfa347d7fc66e50137603489cb195c86de /sys-utils/lsipc.c
parentcfdisk: avoid use of VLA in combination with sizeof() [smatch scan] (diff)
downloadkernel-qcow2-util-linux-87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.tar.gz
kernel-qcow2-util-linux-87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.tar.xz
kernel-qcow2-util-linux-87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.zip
misc: do not use plain 0 as NULL [smatch scan]
text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer Since many 'struct option' has used zero as NULL make them more readable in same go by reindenting, and using named argument requirements. Reference: https://lwn.net/Articles/93577/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/lsipc.c')
-rw-r--r--sys-utils/lsipc.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/sys-utils/lsipc.c b/sys-utils/lsipc.c
index d4e5037ad..ee203e02a 100644
--- a/sys-utils/lsipc.c
+++ b/sys-utils/lsipc.c
@@ -1081,27 +1081,27 @@ int main(int argc, char *argv[])
};
static const struct option longopts[] = {
- { "bytes", no_argument, 0, 'b' },
- { "creator", no_argument, 0, 'c' },
- { "export", no_argument, 0, 'e' },
- { "global", no_argument, 0, 'g' },
- { "help", no_argument, 0, 'h' },
- { "id", required_argument, 0, 'i' },
- { "json", no_argument, 0, 'J' },
- { "list", no_argument, 0, 'l' },
- { "newline", no_argument, 0, 'n' },
- { "noheadings", no_argument, 0, OPT_NOHEAD },
- { "notruncate", no_argument, 0, OPT_NOTRUNC },
- { "numeric-perms", no_argument, 0, 'P' },
- { "output", required_argument, 0, 'o' },
- { "pid", no_argument, 0, 'p' },
- { "queues", no_argument, 0, 'q' },
- { "raw", no_argument, 0, 'r' },
- { "semaphores", no_argument, 0, 's' },
- { "shmems", no_argument, 0, 'm' },
- { "time", no_argument, 0, 't' },
- { "time-format", required_argument, 0, OPT_TIME_FMT },
- { "version", no_argument, 0, 'V' },
+ { "bytes", no_argument, NULL, 'b' },
+ { "creator", no_argument, NULL, 'c' },
+ { "export", no_argument, NULL, 'e' },
+ { "global", no_argument, NULL, 'g' },
+ { "help", no_argument, NULL, 'h' },
+ { "id", required_argument, NULL, 'i' },
+ { "json", no_argument, NULL, 'J' },
+ { "list", no_argument, NULL, 'l' },
+ { "newline", no_argument, NULL, 'n' },
+ { "noheadings", no_argument, NULL, OPT_NOHEAD },
+ { "notruncate", no_argument, NULL, OPT_NOTRUNC },
+ { "numeric-perms", no_argument, NULL, 'P' },
+ { "output", required_argument, NULL, 'o' },
+ { "pid", no_argument, NULL, 'p' },
+ { "queues", no_argument, NULL, 'q' },
+ { "raw", no_argument, NULL, 'r' },
+ { "semaphores", no_argument, NULL, 's' },
+ { "shmems", no_argument, NULL, 'm' },
+ { "time", no_argument, NULL, 't' },
+ { "time-format", required_argument, NULL, OPT_TIME_FMT },
+ { "version", no_argument, NULL, 'V' },
{NULL, 0, NULL, 0}
};