From dd5602f59b599177fb130512fc543f7efa951990 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 30 May 2006 22:35:03 +0000 Subject: 22474: use variable argument lists to improve error message handling --- Src/Modules/clone.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Src/Modules/clone.c') diff --git a/Src/Modules/clone.c b/Src/Modules/clone.c index 60a21182b..cc303d063 100644 --- a/Src/Modules/clone.c +++ b/Src/Modules/clone.c @@ -58,10 +58,10 @@ bin_clone(char *nam, char **args, UNUSED(Options ops), UNUSED(int func)) mypid = getpid(); #ifdef HAVE_SETSID if (setsid() != mypid) - zwarnnam(nam, "failed to create new session: %e", NULL, errno); + zwarnnam(nam, "failed to create new session: %e", errno); #elif defined(TIOCNOTTY) if (ioctl(SHTTY, TIOCNOTTY, 0)) - zwarnnam(*args, "%e", NULL, errno); + zwarnnam(*args, "%e", errno); setpgrp(0L, mypid); #endif dup2(ttyfd,0); @@ -75,7 +75,7 @@ bin_clone(char *nam, char **args, UNUSED(Options ops), UNUSED(int func)) /* Acquire a controlling terminal */ cttyfd = open(*args, O_RDWR); if (cttyfd == -1) - zwarnnam(nam, "%e", NULL, errno); + zwarnnam(nam, "%e", errno); else { #ifdef TIOCSCTTY ioctl(cttyfd, TIOCSCTTY, 0); @@ -86,7 +86,7 @@ bin_clone(char *nam, char **args, UNUSED(Options ops), UNUSED(int func)) cttyfd = open("/dev/tty", O_RDWR); if (cttyfd == -1) zwarnnam(nam, "could not make %s my controlling tty, job control " - "disabled", *args, 0); + "disabled", *args); else close(cttyfd); @@ -98,7 +98,7 @@ bin_clone(char *nam, char **args, UNUSED(Options ops), UNUSED(int func)) } close(ttyfd); if (pid < 0) { - zerrnam(nam, "fork failed: %e", NULL, errno); + zerrnam(nam, "fork failed: %e", errno); return 1; } lastpid = pid; -- cgit v1.2.3