From c08dcaf147c68bdc4817123998ac369a275403a0 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Mon, 8 Feb 2010 21:23:48 +0000 Subject: [PATCH] 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) MFC after: 3 days --- 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 9105c8cb839d..153c90fbd6ed 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 904a430c1af5..0667db9b5c40 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 0612cd8d7aa8..fb97e8afa9d6 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':