[Asterisk-code-review] res pjsip endpoint identifier ip: Ensure error defaults to 0. (asterisk[13])

George Joseph asteriskteam at digium.com
Wed Jan 25 08:28:34 CST 2017


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/4804 )

Change subject: res_pjsip_endpoint_identifier_ip: Ensure error defaults to 0.
......................................................................


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
---
M res/res_pjsip_endpoint_identifier_ip.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  George Joseph: Looks good to me, approved
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Verified



diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c
index 6892231..c16e84a 100644
--- a/res/res_pjsip_endpoint_identifier_ip.c
+++ b/res/res_pjsip_endpoint_identifier_ip.c
@@ -247,7 +247,7 @@
 
 	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;

-- 
To view, visit https://gerrit.asterisk.org/4804
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I850c250813742bddde65c84e739093c9e01dfe56
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list