summaryrefslogtreecommitdiffstats
path: root/text-utils/more.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 /text-utils/more.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 'text-utils/more.c')
-rw-r--r--text-utils/more.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/text-utils/more.c b/text-utils/more.c
index 76ba24a17..ea881e8ed 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -1481,7 +1481,7 @@ void do_shell(char *filename)
putsout(shell_line);
else {
ttyin(cmdbuf, sizeof(cmdbuf) - 2, '!');
- expanded = 0;
+ expanded = NULL;
rc = expand(&expanded, cmdbuf);
if (expanded) {
if (strlen(expanded) < sizeof(shell_line))
@@ -1634,7 +1634,7 @@ void execute(char *filename, char *cmd, ...)
signal(SIGQUIT, SIG_IGN);
if (catch_susp)
signal(SIGTSTP, SIG_DFL);
- while (wait(0) > 0) ;
+ while (wait(NULL) > 0) ;
signal(SIGINT, end_it);
signal(SIGQUIT, onquit);
if (catch_susp)