summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libexec/comsat/comsat.c8
-rw-r--r--libexec/fingerd/fingerd.c10
-rw-r--r--libexec/ftpd/ftpd.c13
-rw-r--r--libexec/getty/main.c10
-rw-r--r--libexec/getty/subr.c6
-rw-r--r--libexec/rlogind/rlogind.c10
-rw-r--r--libexec/rpc.rstatd/rstat_proc.c18
-rw-r--r--libexec/rpc.rstatd/rstatd.c8
-rw-r--r--libexec/rpc.rusersd/rusers_proc.c13
-rw-r--r--libexec/rpc.rwalld/rwalld.c12
-rw-r--r--libexec/rpc.sprayd/sprayd.c12
-rw-r--r--libexec/rpc.yppasswdd/yppasswdd_mkpw.c6
-rw-r--r--libexec/talkd/announce.c5
-rw-r--r--libexec/talkd/talkd.c5
-rw-r--r--libexec/tcpd/tcpdchk/tcpdchk.c5
15 files changed, 81 insertions, 60 deletions
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c
index 908da5b0cf4..e18725c91c9 100644
--- a/libexec/comsat/comsat.c
+++ b/libexec/comsat/comsat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: comsat.c,v 1.16 2001/05/12 01:46:54 deraadt Exp $ */
+/* $OpenBSD: comsat.c,v 1.17 2001/07/08 21:18:06 deraadt Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)comsat.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$OpenBSD: comsat.c,v 1.16 2001/05/12 01:46:54 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: comsat.c,v 1.17 2001/07/08 21:18:06 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -289,8 +289,8 @@ jkfprintf(tp, name, offset)
continue;
}
if (line[0] == ' ' || line[0] == '\t' ||
- strncmp(line, "From:", 5) &&
- strncmp(line, "Subject:", 8))
+ (strncmp(line, "From:", 5) &&
+ strncmp(line, "Subject:", 8)))
continue;
}
if (linecnt <= 0 || charcnt <= 0) {
diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c
index 5ab4bac93ea..db9690cce84 100644
--- a/libexec/fingerd/fingerd.c
+++ b/libexec/fingerd/fingerd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fingerd.c,v 1.20 2001/01/25 19:22:08 deraadt Exp $ */
+/* $OpenBSD: fingerd.c,v 1.21 2001/07/08 21:18:07 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "from: @(#)fingerd.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: fingerd.c,v 1.20 2001/01/25 19:22:08 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: fingerd.c,v 1.21 2001/07/08 21:18:07 deraadt Exp $";
#endif
#endif /* not lint */
@@ -82,7 +82,8 @@ main(argc, argv)
register int ch, ac = 2;
int p[2], logging, secure, user_required, short_list;
#define ENTRIES 50
- char **ap, *av[ENTRIES + 1], **comp, line[8192], *lp, *prog, *hname;
+ char **comp, *prog;
+ char **ap, *av[ENTRIES + 1], line[8192], *lp, *hname;
char hostbuf[MAXHOSTNAMELEN];
prog = _PATH_FINGER;
@@ -190,7 +191,8 @@ main(argc, argv)
*comp = prog;
if (user_required) {
- for (ap = comp + 1; strcmp("--", *(ap++)); );
+ for (ap = comp + 1; strcmp("--", *(ap++)); )
+ ;
if (*ap == NULL) {
(void) puts("must provide username\r");
exit(1);
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 6bf02253eb7..d41754d26aa 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.102 2001/07/03 21:17:56 millert Exp $ */
+/* $OpenBSD: ftpd.c,v 1.103 2001/07/08 21:18: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.102 2001/07/03 21:17:56 millert Exp $";
+static char rcsid[] = "$OpenBSD: ftpd.c,v 1.103 2001/07/08 21:18:07 deraadt Exp $";
#endif
#endif /* not lint */
@@ -1576,7 +1576,8 @@ receive_data(instr, outstr)
FILE *instr, *outstr;
{
int c;
- int cnt, bare_lfs = 0;
+ int cnt;
+ volatile int bare_lfs = 0;
char buf[BUFSIZ];
transflag++;
@@ -1790,7 +1791,6 @@ printaddr:
}
/* EPRT/EPSV */
-epsvonly:
{
u_char af;
@@ -2567,9 +2567,10 @@ send_file_list(whichf)
DIR *dirp = NULL;
struct dirent *dir;
FILE *dout = NULL;
- char **dirlist, *dirname;
+ char **dirlist;
+ char *dirname;
int simple = 0;
- int freeglob = 0;
+ volatile int freeglob = 0;
glob_t gl;
if (strpbrk(whichf, "~{[*?") != NULL) {
diff --git a/libexec/getty/main.c b/libexec/getty/main.c
index 5a900c5fe96..c82a8db1a2a 100644
--- a/libexec/getty/main.c
+++ b/libexec/getty/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.18 2001/01/31 19:13:36 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.19 2001/07/08 21:18:08 deraadt Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/
-static char rcsid[] = "$OpenBSD: main.c,v 1.18 2001/01/31 19:13:36 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.19 2001/07/08 21:18:08 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -357,8 +357,8 @@ getname()
register int c;
register char *np;
unsigned char cs;
- int ppp_state = 0;
- int ppp_connection = 0;
+ volatile int ppp_state = 0;
+ volatile int ppp_connection = 0;
/*
* Interrupt may happen if we use CBREAK mode
@@ -467,7 +467,7 @@ static void
putpad(s)
register char *s;
{
- register pad = 0;
+ int pad = 0;
speed_t ospeed = cfgetospeed(&tmode);
if (isdigit(*s)) {
diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c
index 21efd017a17..e74d383875a 100644
--- a/libexec/getty/subr.c
+++ b/libexec/getty/subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr.c,v 1.12 2001/06/11 15:18:50 mickey Exp $ */
+/* $OpenBSD: subr.c,v 1.13 2001/07/08 21:18:08 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)subr.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$OpenBSD: subr.c,v 1.12 2001/06/11 15:18:50 mickey Exp $";
+static char rcsid[] = "$OpenBSD: subr.c,v 1.13 2001/07/08 21:18:08 deraadt Exp $";
#endif /* not lint */
/*
@@ -260,7 +260,7 @@ setflags(n)
CLR(cflag, PARODD);
if (AP)
CLR(iflag, INPCK);
- } else if (AP || EP && OP) {
+ } else if (AP || (EP && OP)) {
CLR(iflag, INPCK|IGNPAR);
CLR(cflag, PARODD);
}
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index a9b5c3a5e3e..7657294c972 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlogind.c,v 1.28 2001/06/11 15:18:50 mickey Exp $ */
+/* $OpenBSD: rlogind.c,v 1.29 2001/07/08 21:18:09 deraadt Exp $ */
/*-
* Copyright (c) 1983, 1988, 1989, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/* from: static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; */
-static char *rcsid = "$OpenBSD: rlogind.c,v 1.28 2001/06/11 15:18:50 mickey Exp $";
+static char *rcsid = "$OpenBSD: rlogind.c,v 1.29 2001/07/08 21:18:09 deraadt Exp $";
#endif /* not lint */
/*
@@ -70,6 +70,7 @@ static char *rcsid = "$OpenBSD: rlogind.c,v 1.28 2001/06/11 15:18:50 mickey Exp
#include <pwd.h>
#include <syslog.h>
+#include <util.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
@@ -416,7 +417,7 @@ protocol(f, p)
register int f, p;
{
char pibuf[1024+1], fibuf[1024], *pbp, *fbp;
- register pcc = 0, fcc = 0;
+ register int pcc = 0, fcc = 0;
int cc, nfd, n;
char cntl;
@@ -447,12 +448,13 @@ protocol(f, p)
omask = &obits;
} else
FD_SET(f, &ibits);
- if (pcc >= 0)
+ if (pcc >= 0) {
if (pcc) {
FD_SET(f, &obits);
omask = &obits;
} else
FD_SET(p, &ibits);
+ }
FD_SET(p, &ebits);
if ((n = select(nfd, &ibits, omask, &ebits, 0)) < 0) {
if (errno == EINTR)
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c
index 73c5776bb91..e98bec52391 100644
--- a/libexec/rpc.rstatd/rstat_proc.c
+++ b/libexec/rpc.rstatd/rstat_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp $ */
+/* $OpenBSD: rstat_proc.c,v 1.15 2001/07/08 21:18:09 deraadt Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";*/
/*static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp $";
+static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.15 2001/07/08 21:18:09 deraadt Exp $";
#endif
/*
@@ -51,7 +51,7 @@ static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp
#include <sys/socket.h>
#include <nlist.h>
#include <syslog.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <sys/param.h>
#ifdef BSD
#include <sys/vmmeter.h>
@@ -110,7 +110,6 @@ int hz;
struct ifnet_head ifnetq; /* chain of ethernet interfaces */
int numintfs;
-int stats_service();
extern int from_inetd;
int sincelastreq = 0; /* number of alarms since last request */
@@ -123,14 +122,18 @@ union {
struct statstime s3;
} stats_all;
-void updatestat();
-static stat_is_init = 0;
-extern int errno;
+int stats_service();
+void updatestat(void);
+void setup(void);
+int havedisk(void);
+
+static int stat_is_init = 0;
#ifndef FSCALE
#define FSCALE (1 << 8)
#endif
+void
stat_init()
{
stat_is_init = 1;
@@ -331,6 +334,7 @@ updatestat()
errno = save_errno;
}
+void
setup()
{
struct ifnet ifnet;
diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c
index 1621a79b520..2f20a8020d4 100644
--- a/libexec/rpc.rstatd/rstatd.c
+++ b/libexec/rpc.rstatd/rstatd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rstatd.c,v 1.5 2001/01/28 19:34:31 niklas Exp $ */
+/* $OpenBSD: rstatd.c,v 1.6 2001/07/08 21:18:10 deraadt Exp $ */
/*-
* Copyright (c) 1993, John Brezak
@@ -34,13 +34,16 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rstatd.c,v 1.5 2001/01/28 19:34:31 niklas Exp $";
+static char rcsid[] = "$OpenBSD: rstatd.c,v 1.6 2001/07/08 21:18:10 deraadt Exp $";
#endif /* not lint */
+#include <sys/types.h>
+#include <sys/socket.h>
#include <stdio.h>
#include <rpc/rpc.h>
#include <signal.h>
#include <syslog.h>
+#include <stdlib.h>
#include <rpcsvc/rstat.h>
extern void rstat_service();
@@ -57,6 +60,7 @@ cleanup()
_exit(0);
}
+int
main(argc, argv)
int argc;
char *argv[];
diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c
index 93c3bb09939..820d08a7ef4 100644
--- a/libexec/rpc.rusersd/rusers_proc.c
+++ b/libexec/rpc.rusersd/rusers_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rusers_proc.c,v 1.8 2001/01/28 19:34:31 niklas Exp $ */
+/* $OpenBSD: rusers_proc.c,v 1.9 2001/07/08 21:18:10 deraadt Exp $ */
/*-
* Copyright (c) 1993 John Brezak
@@ -29,19 +29,20 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rusers_proc.c,v 1.8 2001/01/28 19:34:31 niklas Exp $";
+static char rcsid[] = "$OpenBSD: rusers_proc.c,v 1.9 2001/07/08 21:18:10 deraadt Exp $";
#endif /* not lint */
-#include <signal.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
+#include <signal.h>
#include <utmp.h>
#include <stdio.h>
#include <syslog.h>
+#include <string.h>
#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <sys/param.h>
-#include <sys/stat.h>
#ifdef XIDLE
#include <setjmp.h>
#include <X11/Xlib.h>
diff --git a/libexec/rpc.rwalld/rwalld.c b/libexec/rpc.rwalld/rwalld.c
index 7a8f5f7cd01..b43dfc79136 100644
--- a/libexec/rpc.rwalld/rwalld.c
+++ b/libexec/rpc.rwalld/rwalld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rwalld.c,v 1.4 2001/01/28 19:34:32 niklas Exp $ */
+/* $OpenBSD: rwalld.c,v 1.5 2001/07/08 21:18:11 deraadt Exp $ */
/*
* Copyright (c) 1993 Christopher G. Demetriou
@@ -30,19 +30,20 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rwalld.c,v 1.4 2001/01/28 19:34:32 niklas Exp $";
+static char rcsid[] = "$OpenBSD: rwalld.c,v 1.5 2001/07/08 21:18:11 deraadt Exp $";
#endif /* not lint */
-#include <unistd.h>
#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/wait.h>
#include <pwd.h>
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include <errno.h>
-#include <sys/socket.h>
+#include <unistd.h>
#include <signal.h>
-#include <sys/wait.h>
#include <rpc/rpc.h>
#include <rpcsvc/rwall.h>
@@ -63,6 +64,7 @@ cleanup()
_exit(0);
}
+int
main(argc, argv)
int argc;
char *argv[];
diff --git a/libexec/rpc.sprayd/sprayd.c b/libexec/rpc.sprayd/sprayd.c
index d6850b16005..8b31a8c97cf 100644
--- a/libexec/rpc.sprayd/sprayd.c
+++ b/libexec/rpc.sprayd/sprayd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sprayd.c,v 1.3 2001/01/28 19:34:32 niklas Exp $*/
+/* $OpenBSD: sprayd.c,v 1.4 2001/07/08 21:18:11 deraadt Exp $*/
/*
* Copyright (c) 1994 Christos Zoulas
@@ -32,14 +32,18 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: sprayd.c,v 1.3 2001/01/28 19:34:32 niklas Exp $";
+static char rcsid[] = "$OpenBSD: sprayd.c,v 1.4 2001/07/08 21:18:11 deraadt Exp $";
#endif /* not lint */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
#include <stdio.h>
+#include <stdlib.h>
#include <signal.h>
-#include <rpc/rpc.h>
-#include <sys/time.h>
+#include <unistd.h>
#include <syslog.h>
+#include <rpc/rpc.h>
#include <rpcsvc/spray.h>
static void spray_service __P((struct svc_req *, SVCXPRT *));
diff --git a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c
index 0f6f46da350..55012d2e504 100644
--- a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c
+++ b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yppasswdd_mkpw.c,v 1.19 2000/11/26 01:29:43 millert Exp $ */
+/* $OpenBSD: yppasswdd_mkpw.c,v 1.20 2001/07/08 21:18:11 deraadt Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: yppasswdd_mkpw.c,v 1.19 2000/11/26 01:29:43 millert Exp $";
+static char rcsid[] = "$OpenBSD: yppasswdd_mkpw.c,v 1.20 2001/07/08 21:18:11 deraadt Exp $";
#endif
#include <sys/param.h>
@@ -65,7 +65,7 @@ ok_shell(name)
char *p, *sh;
setusershell();
- while (sh = getusershell()) {
+ while ((sh = getusershell())) {
if (!strcmp(name, sh))
return (name);
/* allow just shell name, but use "real" path */
diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c
index fca40351826..432d6a1ecfa 100644
--- a/libexec/talkd/announce.c
+++ b/libexec/talkd/announce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: announce.c,v 1.10 2000/10/10 12:44:37 itojun Exp $ */
+/* $OpenBSD: announce.c,v 1.11 2001/07/08 21:18:12 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)announce.c 5.9 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: announce.c,v 1.10 2000/10/10 12:44:37 itojun Exp $";
+static char rcsid[] = "$Id: announce.c,v 1.11 2001/07/08 21:18:12 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -66,7 +66,6 @@ announce(request, remote_machine)
CTL_MSG *request;
char *remote_machine;
{
- int pid, status;
char full_tty[MAXPATHLEN];
FILE *tf;
struct stat stbuf;
diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c
index 93016cd74ba..01c960238a3 100644
--- a/libexec/talkd/talkd.c
+++ b/libexec/talkd/talkd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: talkd.c,v 1.8 2001/01/11 22:07:44 deraadt Exp $ */
+/* $OpenBSD: talkd.c,v 1.9 2001/07/08 21:18:12 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)talkd.c 5.8 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: talkd.c,v 1.8 2001/01/11 22:07:44 deraadt Exp $";
+static char rcsid[] = "$Id: talkd.c,v 1.9 2001/07/08 21:18:12 deraadt Exp $";
#endif /* not lint */
/*
@@ -75,6 +75,7 @@ char hostname[MAXHOSTNAMELEN];
#define TIMEOUT 30
#define MAXIDLE 120
+int
main(argc, argv)
int argc;
char *argv[];
diff --git a/libexec/tcpd/tcpdchk/tcpdchk.c b/libexec/tcpd/tcpdchk/tcpdchk.c
index fc9c140d60b..ec605da57da 100644
--- a/libexec/tcpd/tcpdchk/tcpdchk.c
+++ b/libexec/tcpd/tcpdchk/tcpdchk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpdchk.c,v 1.4 2000/10/14 00:56:14 itojun Exp $ */
+/* $OpenBSD: tcpdchk.c,v 1.5 2001/07/08 21:18:13 deraadt Exp $ */
/*
* tcpdchk - examine all tcpd access control rules and inetd.conf entries
@@ -20,7 +20,7 @@
#if 0
static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
#else
-static char rcsid[] = "$OpenBSD: tcpdchk.c,v 1.4 2000/10/14 00:56:14 itojun Exp $";
+static char rcsid[] = "$OpenBSD: tcpdchk.c,v 1.5 2001/07/08 21:18:13 deraadt Exp $";
#endif
#endif
@@ -34,6 +34,7 @@ static char rcsid[] = "$OpenBSD: tcpdchk.c,v 1.4 2000/10/14 00:56:14 itojun Exp
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
+#include <stdlib.h>
#include <syslog.h>
#include <setjmp.h>
#include <errno.h>