From 5d58b43ccc36e1e4b452751a9a05b9caded186bd Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 26 May 2002 09:32:45 +0000 Subject: pid_t cleanup --- libexec/ftpd/ftpd.c | 6 +++--- libexec/ftpd/popen.c | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'libexec/ftpd') diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 4e3a465c948..d8624462bdf 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.125 2002/03/30 22:01:51 deraadt Exp $ */ +/* $OpenBSD: ftpd.c,v 1.126 2002/05/26 09:32:07 deraadt Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -73,7 +73,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94"; #else -static char rcsid[] = "$OpenBSD: ftpd.c,v 1.125 2002/03/30 22:01:51 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ftpd.c,v 1.126 2002/05/26 09:32:07 deraadt Exp $"; #endif #endif /* not lint */ @@ -474,7 +474,7 @@ main(argc, argv, envp) } /* set this here so klogin can use it... */ - (void)snprintf(ttyline, sizeof(ttyline), "ftp%d", getpid()); + (void)snprintf(ttyline, sizeof(ttyline), "ftp%ld", (long)getpid()); sa.sa_handler = SIG_DFL; (void) sigaction(SIGCHLD, &sa, NULL); diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c index acf15a6f934..4e83ddf02e1 100644 --- a/libexec/ftpd/popen.c +++ b/libexec/ftpd/popen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: popen.c,v 1.14 2002/01/23 16:31:18 mpech Exp $ */ +/* $OpenBSD: popen.c,v 1.15 2002/05/26 09:32:07 deraadt Exp $ */ /* $NetBSD: popen.c,v 1.5 1995/04/11 02:45:00 cgd Exp $ */ /* @@ -78,7 +78,8 @@ ftpd_popen(program, type) { char *cp; FILE *iop; - int argc, gargc, pdes[2], pid; + int argc, gargc, pdes[2]; + pid_t pid; char **pop, *argv[MAX_ARGV], *gargv[MAX_GARGV]; if ((*type != 'r' && *type != 'w') || type[1]) @@ -127,7 +128,7 @@ ftpd_popen(program, type) iop = NULL; - switch(pid = fork()) { + switch (pid = fork()) { case -1: /* error */ (void)close(pdes[0]); (void)close(pdes[1]); -- cgit v1.2.3