summaryrefslogtreecommitdiff
path: root/main/framehook.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-02-21 20:17:52 +0000
committerTerry Wilson <twilson@digium.com>2012-02-21 20:17:52 +0000
commitc25a442dfbda4bb30625e50a03aa9770c54dda01 (patch)
tree930cb5665064ebd498df5c37b6731be8820321ba /main/framehook.c
parent1c971ae60497cc84d2c847a277c62531b663d8d4 (diff)
Fix some opaquification-related compiler warnings
(closes issue ASTERISK-19419) PseudoReview - seanbright on IRC git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/framehook.c')
-rw-r--r--main/framehook.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/framehook.c b/main/framehook.c
index 14f619866..67d55847a 100644
--- a/main/framehook.c
+++ b/main/framehook.c
@@ -104,12 +104,14 @@ int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interfac
framehook->chan = chan;
/* create the framehook list if it didn't already exist */
- if (!ast_channel_framehooks(chan) && !(fh_list = ast_calloc(1, sizeof(*ast_channel_framehooks(chan))))) {
- ast_free(framehook);
- return -1;
+ if (!ast_channel_framehooks(chan)) {
+ if (!(fh_list = ast_calloc(1, sizeof(*ast_channel_framehooks(chan))))) {
+ ast_free(framehook);
+ return -1;
+ }
+ ast_channel_framehooks_set(chan, fh_list);
}
- ast_channel_framehooks_set(chan, fh_list);
framehook->id = ++ast_channel_framehooks(chan)->id_count;
AST_LIST_INSERT_TAIL(&ast_channel_framehooks(chan)->list, framehook, list);