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

Diff for /src/usr.bin/chpass/util.c between version 1.7 and 1.8

version 1.7, 2003/07/01 01:01:28 version 1.8, 2008/06/19 19:16:04
Line 67 
Line 67 
 int  int
 atot(char *p, time_t *store)  atot(char *p, time_t *store)
 {  {
         static struct tm *lt;  
         struct tm tm;          struct tm tm;
         time_t tval;          time_t tval;
         char *t;          char *t;
Line 75 
Line 74 
         if (!*p) {          if (!*p) {
                 *store = 0;                  *store = 0;
                 return (0);                  return (0);
         }  
         if (!lt) {  
                 unsetenv("TZ");  
                 (void)time(&tval);  
                 lt = localtime(&tval);  
         }          }
         (void) memset(&tm, 0, sizeof(tm));          (void) memset(&tm, 0, sizeof(tm));
         for (t = p; (t = strchr(t, ',')) != NULL; t++)          for (t = p; (t = strchr(t, ',')) != NULL; t++)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8