diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-21 19:19:35 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-21 19:19:35 +0000 |
commit | c3f42e93be8bfa121a926d417cd90afbd06877f8 (patch) | |
tree | e6866744fe4ebe346f50a239674fa03b159ef602 | |
parent | 3b6c2dc39209739e2937647231e34956fcdf1dbe (diff) |
update LOCAL_USER_ADD to use ast_calloc
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14000 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | include/asterisk/module.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asterisk/module.h b/include/asterisk/module.h index 2af08533c..e159642c0 100644 --- a/include/asterisk/module.h +++ b/include/asterisk/module.h @@ -26,6 +26,8 @@ #ifndef _ASTERISK_MODULE_H #define _ASTERISK_MODULE_H +#include "asterisk/utils.h" + #if defined(__cplusplus) || defined(c_plusplus) extern "C" { #endif @@ -318,10 +320,8 @@ struct localuser { */ #define LOCAL_USER_ADD(u) { \ \ - if (!(u=calloc(1,sizeof(*u)))) { \ - ast_log(LOG_WARNING, "Out of memory\n"); \ + if (!(u = ast_calloc(1, sizeof(*u)))) \ return -1; \ - } \ ast_mutex_lock(&localuser_lock); \ u->chan = chan; \ u->next = localusers; \ |