summaryrefslogtreecommitdiffstats
path: root/sys-utils/unshare.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/unshare.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/unshare.c')
-rw-r--r--sys-utils/unshare.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c
index 0d02b70b3..bccd75f3a 100644
--- a/sys-utils/unshare.c
+++ b/sys-utils/unshare.c
@@ -280,23 +280,23 @@ int main(int argc, char *argv[])
OPT_SETGROUPS
};
static const struct option longopts[] = {
- { "help", no_argument, 0, 'h' },
- { "version", no_argument, 0, 'V'},
-
- { "mount", optional_argument, 0, 'm' },
- { "uts", optional_argument, 0, 'u' },
- { "ipc", optional_argument, 0, 'i' },
- { "net", optional_argument, 0, 'n' },
- { "pid", optional_argument, 0, 'p' },
- { "user", optional_argument, 0, 'U' },
- { "cgroup", optional_argument, 0, 'C' },
-
- { "fork", no_argument, 0, 'f' },
- { "mount-proc", optional_argument, 0, OPT_MOUNTPROC },
- { "map-root-user", no_argument, 0, 'r' },
- { "propagation", required_argument, 0, OPT_PROPAGATION },
- { "setgroups", required_argument, 0, OPT_SETGROUPS },
- { NULL, 0, 0, 0 }
+ { "help", no_argument, NULL, 'h' },
+ { "version", no_argument, NULL, 'V' },
+
+ { "mount", optional_argument, NULL, 'm' },
+ { "uts", optional_argument, NULL, 'u' },
+ { "ipc", optional_argument, NULL, 'i' },
+ { "net", optional_argument, NULL, 'n' },
+ { "pid", optional_argument, NULL, 'p' },
+ { "user", optional_argument, NULL, 'U' },
+ { "cgroup", optional_argument, NULL, 'C' },
+
+ { "fork", no_argument, NULL, 'f' },
+ { "mount-proc", optional_argument, NULL, OPT_MOUNTPROC },
+ { "map-root-user", no_argument, NULL, 'r' },
+ { "propagation", required_argument, NULL, OPT_PROPAGATION },
+ { "setgroups", required_argument, NULL, OPT_SETGROUPS },
+ { NULL, 0, NULL, 0 }
};
int setgrpcmd = SETGROUPS_NONE;