summaryrefslogtreecommitdiffstats
path: root/login-utils/chfn.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 /login-utils/chfn.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 'login-utils/chfn.c')
-rw-r--r--login-utils/chfn.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/login-utils/chfn.c b/login-utils/chfn.c
index 7f00f79a3..faddd89a7 100644
--- a/login-utils/chfn.c
+++ b/login-utils/chfn.c
@@ -133,13 +133,13 @@ static void parse_argv(struct chfn_control *ctl, int argc, char **argv)
{
int index, c, status = 0;
static const struct option long_options[] = {
- {"full-name", required_argument, 0, 'f'},
- {"office", required_argument, 0, 'o'},
- {"office-phone", required_argument, 0, 'p'},
- {"home-phone", required_argument, 0, 'h'},
- {"help", no_argument, 0, 'u'},
- {"version", no_argument, 0, 'v'},
- {NULL, no_argument, 0, '0'},
+ { "full-name", required_argument, NULL, 'f' },
+ { "office", required_argument, NULL, 'o' },
+ { "office-phone", required_argument, NULL, 'p' },
+ { "home-phone", required_argument, NULL, 'h' },
+ { "help", no_argument, NULL, 'u' },
+ { "version", no_argument, NULL, 'v' },
+ { NULL, 0, NULL, 0 },
};
while ((c = getopt_long(argc, argv, "f:r:p:h:o:uv", long_options,