=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/Attic/getname.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/mail/Attic/getname.c 1997/07/14 00:24:27 1.4 +++ src/usr.bin/mail/Attic/getname.c 2001/11/21 15:26:39 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: getname.c,v 1.4 1997/07/14 00:24:27 millert Exp $ */ +/* $OpenBSD: getname.c,v 1.5 2001/11/21 15:26:39 millert Exp $ */ /* $NetBSD: getname.c,v 1.4 1996/06/08 19:48:23 christos Exp $ */ /* @@ -36,9 +36,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)getname.c 8.1 (Berkeley) 6/6/93"; +static const char sccsid[] = "@(#)getname.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: getname.c,v 1.4 1997/07/14 00:24:27 millert Exp $"; +static const char rcsid[] = "$OpenBSD: getname.c,v 1.5 2001/11/21 15:26:39 millert Exp $"; #endif #endif /* not lint */ @@ -52,8 +52,7 @@ * Search the passwd file for a uid. Return name on success, NULL on failure */ char * -getname(uid) - int uid; +getname(uid_t uid) { struct passwd *pw; @@ -66,13 +65,12 @@ * Convert the passed name to a user id and return it. Return -1 * on error. */ -int -getuserid(name) - char name[]; +uid_t +getuserid(char *name) { struct passwd *pw; if ((pw = getpwnam(name)) == NULL) - return(-1); + return(UID_MAX); return(pw->pw_uid); }