[BACK]Return to getname.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mail

Diff for /src/usr.bin/mail/Attic/getname.c between version 1.4 and 1.5

version 1.4, 1997/07/14 00:24:27 version 1.5, 2001/11/21 15:26:39
Line 36 
Line 36 
   
 #ifndef lint  #ifndef lint
 #if 0  #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  #else
 static char rcsid[] = "$OpenBSD$";  static const char rcsid[] = "$OpenBSD$";
 #endif  #endif
 #endif /* not lint */  #endif /* not lint */
   
Line 52 
Line 52 
  * Search the passwd file for a uid.  Return name on success, NULL on failure   * Search the passwd file for a uid.  Return name on success, NULL on failure
  */   */
 char *  char *
 getname(uid)  getname(uid_t uid)
         int uid;  
 {  {
         struct passwd *pw;          struct passwd *pw;
   
Line 66 
Line 65 
  * Convert the passed name to a user id and return it.  Return -1   * Convert the passed name to a user id and return it.  Return -1
  * on error.   * on error.
  */   */
 int  uid_t
 getuserid(name)  getuserid(char *name)
         char name[];  
 {  {
         struct passwd *pw;          struct passwd *pw;
   
         if ((pw = getpwnam(name)) == NULL)          if ((pw = getpwnam(name)) == NULL)
                 return(-1);                  return(UID_MAX);
         return(pw->pw_uid);          return(pw->pw_uid);
 }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5