[sr-dev] git:master:b2c3344f: core: remove unnecessary negative check for unsigned int value (code scan warning)

Henning Westerholt hw at skalatan.de
Fri Sep 20 10:17:16 CEST 2019


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

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2019-09-20T10:16:32+02:00

core: remove unnecessary negative check for unsigned int value (code scan warning)

---

Modified: src/core/flags.c

---

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

---

diff --git a/src/core/flags.c b/src/core/flags.c
index 589421ce7b..551eefe2ee 100644
--- a/src/core/flags.c
+++ b/src/core/flags.c
@@ -66,10 +66,6 @@ int flag_in_range( flag_t flag ) {
 		LM_ERR("message flag %d too high; MAX=%d\n", flag, MAX_FLAG );
 		return 0;
 	}
-	if ((int)flag<0) {
-		LM_ERR("message flag (%d) must be in range 0..%d\n", flag, MAX_FLAG );
-		return 0;
-	}
 	return 1;
 }
 




More information about the sr-dev mailing list