[sr-dev] git:master:9ba1a6c8: nathelper: remove redundant check for zero

Henning Westerholt hw at skalatan.de
Mon Nov 25 20:54:18 CET 2019


Module: kamailio
Branch: master
Commit: 9ba1a6c851aafc402f5fbe211638159717120c31
URL: https://github.com/kamailio/kamailio/commit/9ba1a6c851aafc402f5fbe211638159717120c31

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2019-11-25T20:48:05+01:00

nathelper: remove redundant check for zero

---

Modified: src/modules/nathelper/nathelper.c

---

Diff:  https://github.com/kamailio/kamailio/commit/9ba1a6c851aafc402f5fbe211638159717120c31.diff
Patch: https://github.com/kamailio/kamailio/commit/9ba1a6c851aafc402f5fbe211638159717120c31.patch

---

diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index afc38f727b..be95ddd8cd 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -2581,7 +2581,7 @@ static int alias_to_uri(str *contact_header, str *alias_uri){
 			i=i+SALIAS_LEN;
 			host.s = &contact_header->s[i];
 			memchr_pointer = memchr(host.s , 126 /* ~ */,contact_header->len-i);
-				if(memchr_pointer == NULL || memchr_pointer == 0) {
+				if(memchr_pointer == NULL) {
 					LM_ERR("No alias parameter found for host\n");
 					return -1;
 				} else {




More information about the sr-dev mailing list