diff options
author | Terry Wilson <twilson@digium.com> | 2012-02-21 20:17:52 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2012-02-21 20:17:52 +0000 |
commit | c25a442dfbda4bb30625e50a03aa9770c54dda01 (patch) | |
tree | 930cb5665064ebd498df5c37b6731be8820321ba /res/res_monitor.c | |
parent | 1c971ae60497cc84d2c847a277c62531b663d8d4 (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 'res/res_monitor.c')
-rw-r--r-- | res/res_monitor.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c index 045fa6aa7..5482f549c 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -689,11 +689,13 @@ static int start_monitor_exec(struct ast_channel *chan, const char *data) snprintf(tmp, sizeof(tmp), "%s/%s.%s", urlprefix, args.fname_base, ((strcmp(args.format, "gsm")) ? "wav" : "gsm")); ast_channel_lock(chan); - if (!ast_channel_cdr(chan) && !(chan_cdr = ast_cdr_alloc())) { - ast_channel_unlock(chan); - return -1; + if (!ast_channel_cdr(chan)) { + if (!(chan_cdr = ast_cdr_alloc())) { + ast_channel_unlock(chan); + return -1; + } + ast_channel_cdr_set(chan, chan_cdr); } - ast_channel_cdr_set(chan, chan_cdr); ast_cdr_setuserfield(chan, tmp); ast_channel_unlock(chan); } |