apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: cvs commit: apr/strings apr_cpystrn.c
Date Fri, 17 May 2002 14:51:48 GMT
>        size_t len = strlen(str) + 1;
>    
>        if (!(sdup = (char *) malloc(len))) {
>   -        /* ### whoops! we can't call Apache logging routines here... */
>   -#if 0
>   -        apr_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
>   -                      "Ouch! Out of memory in our strdup()!");
>   -#endif
>            return NULL;
>        }
>        memcpy(sdup, str, len);

Do we really need to check for out-of-memory here? Let's save the if().

-aaron

Mime
View raw message