diff options
author | Kinsey Moore <kmoore@digium.com> | 2012-06-11 15:23:30 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2012-06-11 15:23:30 +0000 |
commit | c6142cf2cc7312122abcf74d6ab1daf0ad1d72bf (patch) | |
tree | 3d00ae5c1e40b99710f72f10a1f65d62ce83b01d /channels/sip | |
parent | 566ea22e1878ad6a576431d1035a5fe9b4a936d1 (diff) |
Fix coverity UNUSED_VALUE findings in core support level files
Most of these were just saving returned values without using them and
in some cases the variable being saved to could be removed as well.
(issue ASTERISK-19672)
........
Merged revisions 368738 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 368739 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip')
-rw-r--r-- | channels/sip/dialplan_functions.c | 4 | ||||
-rw-r--r-- | channels/sip/reqresp_parser.c | 2 | ||||
-rw-r--r-- | channels/sip/sdp_crypto.c | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c index fd8b04fb2..75fe82d4d 100644 --- a/channels/sip/dialplan_functions.c +++ b/channels/sip/dialplan_functions.c @@ -153,9 +153,9 @@ int sip_acf_channel_read(struct ast_channel *chan, const char *funcname, char *p } if (ast_strlen_zero(args.field) || !strcasecmp(args.field, "all")) { - char quality_buf[AST_MAX_USER_FIELD], *quality; + char quality_buf[AST_MAX_USER_FIELD]; - if (!(quality = ast_rtp_instance_get_quality(rtp, AST_RTP_INSTANCE_STAT_FIELD_QUALITY, quality_buf, sizeof(quality_buf)))) { + if (!ast_rtp_instance_get_quality(rtp, AST_RTP_INSTANCE_STAT_FIELD_QUALITY, quality_buf, sizeof(quality_buf))) { return -1; } diff --git a/channels/sip/reqresp_parser.c b/channels/sip/reqresp_parser.c index e37d75b79..d87acda34 100644 --- a/channels/sip/reqresp_parser.c +++ b/channels/sip/reqresp_parser.c @@ -1079,7 +1079,7 @@ AST_TEST_DEFINE(get_in_brackets_test) } /* Test 6, NULL input */ - if ((uri = get_in_brackets(NULL))) { + if (get_in_brackets(NULL)) { ast_test_status_update(test, "Test 6, NULL input failed.\n"); res = AST_TEST_FAIL; } diff --git a/channels/sip/sdp_crypto.c b/channels/sip/sdp_crypto.c index 85adf83eb..7f8835514 100644 --- a/channels/sip/sdp_crypto.c +++ b/channels/sip/sdp_crypto.c @@ -52,9 +52,7 @@ static int set_crypto_policy(struct ast_srtp_policy *policy, int suite_val, cons static struct sdp_crypto *sdp_crypto_alloc(void) { - struct sdp_crypto *crypto; - - return crypto = ast_calloc(1, sizeof(*crypto)); + return ast_calloc(1, sizeof(struct sdp_crypto)); } void sdp_crypto_destroy(struct sdp_crypto *crypto) |