diff options
author | imp <imp@FreeBSD.org> | 1999-04-25 22:23:38 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1999-04-25 22:23:38 +0000 |
commit | 8b33b875effcc83c5a2de2bd72e2c70b04652373 (patch) | |
tree | def5aac6eb0418a20ccd70112f0e053b4d4f221e /libexec/ftpd | |
parent | 35d2979599d0ad7a7aaf62f3d59fc099119b76d3 (diff) | |
download | FreeBSD-src-8b33b875effcc83c5a2de2bd72e2c70b04652373.zip FreeBSD-src-8b33b875effcc83c5a2de2bd72e2c70b04652373.tar.gz |
More egcs warning fixes:
o main returns int not void
o use return 0 at end of main when needed
o use braces to avoid potentially ambiguous else
o don't default to type int (and also remove a useless register
modifier).
Reviewed by: obrien and chuckr
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index aaa1e7d..4f58d69 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -44,7 +44,7 @@ static char copyright[] = static char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94"; #endif static const char rcsid[] = - "$Id: ftpd.c,v 1.53 1999/04/06 23:05:57 brian Exp $"; + "$Id: ftpd.c,v 1.54 1999/04/07 08:27:40 brian Exp $"; #endif /* not lint */ /* @@ -423,11 +423,12 @@ main(argc, argv, envp) fd = open(pid_file, O_CREAT | O_WRONLY | O_TRUNC | O_NONBLOCK | O_EXLOCK, 0644); - if (fd < 0) + if (fd < 0) { if (errno == EAGAIN) errx(1, "%s: file locked", pid_file); else err(1, "%s", pid_file); + } snprintf(buf, sizeof(buf), "%lu\n", (unsigned long) getpid()); if (write(fd, buf, strlen(buf)) < 0) |