mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
remove almost all of the checks of the result from ast_strdupa() or alloca().
As it turns out, all of these checks were useless, because alloca will never return NULL. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
5
logger.c
5
logger.c
@@ -861,10 +861,7 @@ void ast_verbose(const char *fmt, ...)
|
||||
time(&t);
|
||||
localtime_r(&t, &tm);
|
||||
strftime(date, sizeof(date), dateformat, &tm);
|
||||
if ((datefmt = alloca(strlen(date) + 3 + strlen(fmt) + 1))) {
|
||||
sprintf(datefmt, "[%s] %s", date, fmt);
|
||||
fmt = datefmt;
|
||||
}
|
||||
datefmt = alloca(strlen(date) + 3 + strlen(fmt) + 1);
|
||||
}
|
||||
|
||||
/* this lock is also protecting against multiple threads
|
||||
|
Reference in New Issue
Block a user