From 089ed1a3a82f83c83dbed0cd6c1fbad0d2749bba Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 11 Sep 1997 11:21:56 +0000 Subject: cleanup -Wall --- usr.bin/su/su.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'usr.bin/su') diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 40efb00d1a0..8a31627a2ff 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -1,4 +1,4 @@ -/* $OpenBSD: su.c,v 1.29 1997/06/29 11:10:35 provos Exp $ */ +/* $OpenBSD: su.c,v 1.30 1997/09/11 11:21:55 deraadt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)su.c 5.26 (Berkeley) 7/6/91";*/ -static char rcsid[] = "$OpenBSD: su.c,v 1.29 1997/06/29 11:10:35 provos Exp $"; +static char rcsid[] = "$OpenBSD: su.c,v 1.30 1997/09/11 11:21:55 deraadt Exp $"; #endif /* not lint */ #include @@ -68,6 +68,8 @@ static char rcsid[] = "$OpenBSD: su.c,v 1.29 1997/06/29 11:10:35 provos Exp $"; #include #include +int kerberos __P((char *username, char *user, int uid)); + #define ARGSTR "-Kflm" int use_kerberos = 1; @@ -218,7 +220,7 @@ badlogin: iscsh = NO; } - if (p = strrchr(shell, '/')) + if ((p = strrchr(shell, '/'))) avshell = p+1; else avshell = shell; @@ -319,12 +321,13 @@ ontty() static char buf[MAXPATHLEN + 4]; buf[0] = 0; - if (p = ttyname(STDERR_FILENO)) + if ((p = ttyname(STDERR_FILENO))) snprintf(buf, sizeof(buf), " on %s", p); return (buf); } #ifdef KERBEROS +int kerberos(username, user, uid) char *username, *user; int uid; @@ -332,7 +335,6 @@ kerberos(username, user, uid) KTEXT_ST ticket; AUTH_DAT authdata; struct hostent *hp; - register char *p; int kerno; in_addr_t faddr; char hostname[MAXHOSTNAMELEN], savehost[MAXHOSTNAMELEN]; -- cgit v1.2.3