summaryrefslogtreecommitdiffstats
path: root/sys-utils/umount.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/umount.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/umount.c')
-rw-r--r--sys-utils/umount.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sys-utils/umount.c b/sys-utils/umount.c
index 640e2cd0d..21f7edfed 100644
--- a/sys-utils/umount.c
+++ b/sys-utils/umount.c
@@ -508,23 +508,23 @@ int main(int argc, char **argv)
};
static const struct option longopts[] = {
- { "all", 0, 0, 'a' },
- { "all-targets", 0, 0, 'A' },
- { "detach-loop", 0, 0, 'd' },
- { "fake", 0, 0, UMOUNT_OPT_FAKE },
- { "force", 0, 0, 'f' },
- { "help", 0, 0, 'h' },
- { "internal-only", 0, 0, 'i' },
- { "lazy", 0, 0, 'l' },
- { "no-canonicalize", 0, 0, 'c' },
- { "no-mtab", 0, 0, 'n' },
- { "read-only", 0, 0, 'r' },
- { "recursive", 0, 0, 'R' },
- { "test-opts", 1, 0, 'O' },
- { "types", 1, 0, 't' },
- { "verbose", 0, 0, 'v' },
- { "version", 0, 0, 'V' },
- { NULL, 0, 0, 0 }
+ { "all", no_argument, NULL, 'a' },
+ { "all-targets", no_argument, NULL, 'A' },
+ { "detach-loop", no_argument, NULL, 'd' },
+ { "fake", no_argument, NULL, UMOUNT_OPT_FAKE },
+ { "force", no_argument, NULL, 'f' },
+ { "help", no_argument, NULL, 'h' },
+ { "internal-only", no_argument, NULL, 'i' },
+ { "lazy", no_argument, NULL, 'l' },
+ { "no-canonicalize", no_argument, NULL, 'c' },
+ { "no-mtab", no_argument, NULL, 'n' },
+ { "read-only", no_argument, NULL, 'r' },
+ { "recursive", no_argument, NULL, 'R' },
+ { "test-opts", required_argument, NULL, 'O' },
+ { "types", required_argument, NULL, 't' },
+ { "verbose", no_argument, NULL, 'v' },
+ { "version", no_argument, NULL, 'V' },
+ { NULL, 0, NULL, 0 }
};
static const ul_excl_t excl[] = { /* rows and cols in ASCII order */