diff options
-rw-r--r-- | usr.sbin/ac/ac.c | 4 | ||||
-rw-r--r-- | usr.sbin/arp/arp.c | 5 | ||||
-rw-r--r-- | usr.sbin/diskpart/diskpart.c | 33 |
3 files changed, 21 insertions, 21 deletions
diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c index 313e13a5a24..96a14372d40 100644 --- a/usr.sbin/ac/ac.c +++ b/usr.sbin/ac/ac.c @@ -14,7 +14,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ac.c,v 1.1 1995/10/18 08:47:09 deraadt Exp $"; +static char rcsid[] = "$Id: ac.c,v 1.2 1996/08/29 03:32:19 deraadt Exp $"; #endif #include <sys/types.h> @@ -460,7 +460,7 @@ ac(fp) struct utmp_list *lp, *head = NULL; struct utmp usr; struct tm *ltm; - time_t secs; + time_t secs = 0; int day = -1; while (fread((char *)&usr, sizeof(usr), 1, fp) == 1) { diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 3633b087d03..bff4cccfa95 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -72,6 +72,7 @@ static char *rcsid = "$NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $"; #include <stdlib.h> #include <string.h> #include <paths.h> +#include <unistd.h> int delete __P((const char *, const char *)); void dump __P((u_long)); @@ -274,7 +275,6 @@ get(host) const char *host; { struct sockaddr_inarp *sin; - u_char *ea; sin = &sin_m; sin_m = blank_sin; /* struct copy */ @@ -299,8 +299,6 @@ delete(host, info) register struct sockaddr_inarp *sin; register struct rt_msghdr *rtm; struct sockaddr_dl *sdl; - u_char *ea; - char *eaddr; sin = &sin_m; rtm = &m_rtmsg.m_rtm; @@ -512,7 +510,6 @@ getinetaddr(host, inap) { extern char *__progname; /* Program name, from crt0. */ struct hostent *hp; - u_long addr; if (inet_aton(host, inap) == 1) return (0); diff --git a/usr.sbin/diskpart/diskpart.c b/usr.sbin/diskpart/diskpart.c index 464fc688e4b..d5003aef574 100644 --- a/usr.sbin/diskpart/diskpart.c +++ b/usr.sbin/diskpart/diskpart.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)diskpart.c 5.11 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$Id: diskpart.c,v 1.2 1996/07/10 04:13:39 ccappuc Exp $"; +static char rcsid[] = "$Id: diskpart.c,v 1.3 1996/08/29 03:33:37 deraadt Exp $"; #endif /* not lint */ /* @@ -111,6 +111,7 @@ int dflag; /* print disktab entry */ struct disklabel *promptfordisk(); +int main(argc, argv) int argc; char *argv[]; @@ -444,20 +445,6 @@ again: return (dp); } -gettype(t, names) - char *t; - char **names; -{ - register char **nm; - - for (nm = names; *nm; nm++) - if (ustrcmp(t, *nm) == 0) - return (nm - names); - if (isdigit(*t)) - return (atoi(t)); - return (-1); -} - ustrcmp(s1, s2) register char *s1, *s2; { @@ -473,3 +460,19 @@ ustrcmp(s1, s2) } return (0); } + +int +gettype(t, names) + char *t; + char **names; +{ + register char **nm; + + for (nm = names; *nm; nm++) + if (ustrcmp(t, *nm) == 0) + return (nm - names); + if (isdigit(*t)) + return (atoi(t)); + return (-1); +} + |