summaryrefslogtreecommitdiff
path: root/libexec/ftpd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-26 09:32:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-26 09:32:45 +0000
commit5d58b43ccc36e1e4b452751a9a05b9caded186bd (patch)
treedcc665a69529247e4ba3220f45c2efbf443bf58c /libexec/ftpd
parent0a6d77317c9ca30edbf8887482233697b5ec7799 (diff)
pid_t cleanup
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/ftpd.c6
-rw-r--r--libexec/ftpd/popen.c7
2 files changed, 7 insertions, 6 deletions
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]);