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

Diff for /src/usr.bin/passwd/Attic/yp_passwd.c between version 1.3 and 1.4

version 1.3, 1996/07/22 03:53:21 version 1.4, 1996/08/30 13:37:53
Line 291 
Line 291 
         return (pwent);          return (pwent);
 }  }
   
   static char *__yplin;
   
 static struct passwd *  static struct passwd *
 ypgetpwnam(nam)  ypgetpwnam(nam)
         char *nam;          char *nam;
 {  {
         static struct passwd pwent;          static struct passwd pwent;
         static char line[1024];  
         char *val;          char *val;
         int reason, vallen;          int reason, vallen;
   
Line 310 
Line 311 
                 break;                  break;
         }          }
         val[vallen] = '\0';          val[vallen] = '\0';
         strcpy(line, val);          if (__yplin)
                   free(__yplin);
           __yplin = (char *)malloc(vallen + 1);
           strcpy(__yplin, val);
         free(val);          free(val);
   
         return(interpret(&pwent, line));          return(interpret(&pwent, __yplin));
 }  }
   
 #endif  /* YP */  #endif  /* YP */

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