=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/alloc.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- src/usr.bin/sudo/Attic/alloc.c 1999/11/18 16:29:01 1.1 +++ src/usr.bin/sudo/Attic/alloc.c 2000/06/05 14:01:15 1.2 @@ -121,7 +121,7 @@ * easprintf() calls vasprintf() and exits with an error if vasprintf() * returns -1 (out of memory). */ -void +int #ifdef __STDC__ easprintf(char **ret, const char *fmt, ...) #else @@ -148,21 +148,24 @@ (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); exit(1); } + return(len); } /* * evasprintf() calls vasprintf() and exits with an error if vasprintf() * returns -1 (out of memory). */ -void +int evasprintf(ret, format, args) char **ret; const char *format; 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]); exit(1); } + return(len); }