From: Joshua Colp Date: Tue, 24 Jan 2017 21:39:39 +0000 (+0000) Subject: res_pjsip_endpoint_identifier_ip: Ensure error defaults to 0. X-Git-Tag: 13.14.0-rc1~29^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2f0adccbd0fc3ea18a222783aeecd09cf427815;p=thirdparty%2Fasterisk.git res_pjsip_endpoint_identifier_ip: Ensure error defaults to 0. When configuring a match using a netmask the error variable was not defaulting to 0. For some people this would cause the code to think an error occurred when adding the match when in reality it added perfectly fine. ASTERISK-26693 Change-Id: I850c250813742bddde65c84e739093c9e01dfe56 --- diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c index 68922315e3..c16e84a672 100644 --- a/res/res_pjsip_endpoint_identifier_ip.c +++ b/res/res_pjsip_endpoint_identifier_ip.c @@ -247,7 +247,7 @@ static int ip_identify_match_handler(const struct aco_option *opt, struct ast_va while ((current_string = ast_strip(strsep(&input_string, ",")))) { char *mask = strrchr(current_string, '/'); - int error; + int error = 0; if (ast_strlen_zero(current_string)) { continue;