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

Diff for /src/usr.bin/sudo/Attic/alloc.c between version 1.1 and 1.2

version 1.1, 1999/11/18 16:29:01 version 1.2, 2000/06/05 14:01:15
Line 121 
Line 121 
  * easprintf() calls vasprintf() and exits with an error if vasprintf()   * easprintf() calls vasprintf() and exits with an error if vasprintf()
  * returns -1 (out of memory).   * returns -1 (out of memory).
  */   */
 void  int
 #ifdef __STDC__  #ifdef __STDC__
 easprintf(char **ret, const char *fmt, ...)  easprintf(char **ret, const char *fmt, ...)
 #else  #else
Line 148 
Line 148 
         (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);          (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);
         exit(1);          exit(1);
     }      }
       return(len);
 }  }
   
 /*  /*
  * evasprintf() calls vasprintf() and exits with an error if vasprintf()   * evasprintf() calls vasprintf() and exits with an error if vasprintf()
  * returns -1 (out of memory).   * returns -1 (out of memory).
  */   */
 void  int
 evasprintf(ret, format, args)  evasprintf(ret, format, args)
     char **ret;      char **ret;
     const char *format;      const char *format;
     va_list args;      va_list args;
 {  {
       int len;
   
     if (vasprintf(ret, format, args) == -1) {      if ((len = vasprintf(ret, format, args)) == -1) {
         (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);          (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);
         exit(1);          exit(1);
     }      }
       return(len);
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2