summaryrefslogtreecommitdiff
path: root/usr.bin/sudo/alloc.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-06-05 14:01:17 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-06-05 14:01:17 +0000
commit73091b084d23482ba665f6e69fc121991b50f43a (patch)
treeb85a4bd999c91de9ef12ba05c77592fc031be9f5 /usr.bin/sudo/alloc.c
parent98fefc7adcf3a7ed66947ca63bfadf4b703223cc (diff)
Update to sudo 1.6.3p4
Diffstat (limited to 'usr.bin/sudo/alloc.c')
-rw-r--r--usr.bin/sudo/alloc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/sudo/alloc.c b/usr.bin/sudo/alloc.c
index 01dc36f7be7..b06f8b50bff 100644
--- a/usr.bin/sudo/alloc.c
+++ b/usr.bin/sudo/alloc.c
@@ -121,7 +121,7 @@ estrdup(src)
* 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 @@ easprintf(va_alist)
(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);
}