From b9d3fd67b9a4ccfd7f16cc16cb2b9ccaa25b0f43 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Thu, 18 Feb 2010 10:46:25 +0000 Subject: [PATCH] MFC r203688: Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows the -M option to be used without specifying -N. PR: bin/138146 Approved by: rrs (mentor) --- bin/pkill/pkill.c | 3 ++- bin/ps/ps.c | 3 ++- usr.bin/w/w.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/pkill/pkill.c b/bin/pkill/pkill.c index 69349c3c589..ae0fd89e4ee 100644 --- a/bin/pkill/pkill.c +++ b/bin/pkill/pkill.c @@ -180,7 +180,8 @@ main(int argc, char **argv) debug_opt = 0; pidfile = NULL; pidfilelock = 0; - execf = coref = _PATH_DEVNULL; + execf = NULL; + coref = _PATH_DEVNULL; while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:ad:fg:ij:lnos:t:u:vx")) != -1) switch (ch) { diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 904a430c1af..0667db9b5c4 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -212,7 +212,8 @@ main(int argc, char *argv[]) init_list(&sesslist, addelem_pid, sizeof(pid_t), "session id"); init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty"); init_list(&uidlist, addelem_uid, sizeof(uid_t), "user"); - memf = nlistf = _PATH_DEVNULL; + memf = _PATH_DEVNULL; + nlistf = NULL; while ((ch = getopt(argc, argv, PS_ARGS)) != -1) switch (ch) { case 'A': diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 10ec7b04bd2..dbd41ff60b1 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -158,7 +158,8 @@ main(int argc, char *argv[]) } dropgid = 0; - memf = nlistf = _PATH_DEVNULL; + memf = _PATH_DEVNULL; + nlistf = NULL; while ((ch = getopt(argc, argv, p)) != -1) switch (ch) { case 'd':