projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f882197
)
update LOCAL_USER_ADD to use ast_calloc
author
Russell Bryant
<russell@russellbryant.com>
Tue, 21 Mar 2006 19:19:35 +0000
(19:19 +0000)
committer
Russell Bryant
<russell@russellbryant.com>
Tue, 21 Mar 2006 19:19:35 +0000
(19:19 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14000
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
include/asterisk/module.h
patch
|
blob
|
history
diff --git
a/include/asterisk/module.h
b/include/asterisk/module.h
index
2af0853
..
e159642
100644
(file)
--- 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; \