From 42eddaeaf36d467074f329599193030c3beba8ba Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 20 Oct 1998 04:33:28 +0000 Subject: Make alloca safe. svn path=/trunk/; revision=2115 --- report.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'report.c') diff --git a/report.c b/report.c index 319acba5..d2f12348 100644 --- a/report.c +++ b/report.c @@ -31,13 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if defined(HAVE_SYSLOG) #include #endif -#if defined(HAVE_ALLOCA_H) -#include -#else -#ifdef _AIX - #pragma alloca -#endif -#endif #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC || HAVE_STDARG_H # if HAVE_STDARG_H @@ -159,7 +152,9 @@ error (status, errnum, message, va_alist) if (errnum > 0) { - char *msg = alloca (strlen (message) + 5); + char *msg; + + xalloca(msg, char *, strlen (message) + 5); strcpy (msg, message); strcat (msg, ": %m"); -- cgit v1.2.3