diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-26 09:29:03 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-26 09:29:03 +0000 |
commit | 0a6d77317c9ca30edbf8887482233697b5ec7799 (patch) | |
tree | c962570119c7708fa04aeae7daa5482981ae4da3 /lib/libc | |
parent | 83a6c6911f8ace4bb28af6cf0f98e8a40cab9848 (diff) |
pid_t cleanup
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/syslog.c | 4 | ||||
-rw-r--r-- | lib/libc/stdlib/system.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index a10ecf37702..892a0f3a006 100644 --- a/lib/libc/gen/syslog.c +++ b/lib/libc/gen/syslog.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: syslog.c,v 1.16 2002/02/19 19:39:36 millert Exp $"; +static char rcsid[] = "$OpenBSD: syslog.c,v 1.17 2002/05/26 09:29:02 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -206,7 +206,7 @@ vsyslog_r(pri, data, fmt, ap) DEC(); } if (data->log_stat & LOG_PID) { - prlen = snprintf(p, tbuf_left, "[%d]", getpid()); + prlen = snprintf(p, tbuf_left, "[%ld]", (long)getpid()); DEC(); } if (data->log_tag != NULL) { diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c index dadf3fe8419..636a9ebdffa 100644 --- a/lib/libc/stdlib/system.c +++ b/lib/libc/stdlib/system.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: system.c,v 1.4 2001/09/04 23:35:58 millert Exp $"; +static char *rcsid = "$OpenBSD: system.c,v 1.5 2002/05/26 09:29:02 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -62,7 +62,7 @@ system(command) sigemptyset(&mask); sigaddset(&mask, SIGCHLD); sigprocmask(SIG_BLOCK, &mask, &omask); - switch(pid = vfork()) { + switch (pid = vfork()) { case -1: /* error */ sigprocmask(SIG_SETMASK, &omask, NULL); return(-1); @@ -78,5 +78,5 @@ system(command) sigprocmask(SIG_SETMASK, &omask, NULL); (void)signal(SIGINT, intsave); (void)signal(SIGQUIT, quitsave); - return(pid == -1 ? -1 : pstat); + return (pid == -1 ? -1 : pstat); } |