Module: kamailio
Branch: master
Commit: f2a7a3c09ee881247c8a6641ec8d3b1e0e0eb812
URL:
https://github.com/kamailio/kamailio/commit/f2a7a3c09ee881247c8a6641ec8d3b1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-07-14T18:56:20+02:00
dispatcher: remove unnecessary comparisons for unsigned
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f2a7a3c09ee881247c8a6641ec8d3b1…
Patch:
https://github.com/kamailio/kamailio/commit/f2a7a3c09ee881247c8a6641ec8d3b1…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index ecd0f3a0c9d..d36141bbafd 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -408,13 +408,13 @@ int ds_set_attrs(ds_dest_t *dest, str *vattrs)
str2int(&pit->body, &dest->attrs.ocrate);
}
}
- if(dest->attrs.ocmax < 0 || dest->attrs.ocmax > 100) {
+ if(dest->attrs.ocmax > 100) {
dest->attrs.ocmax = 100;
}
- if(dest->attrs.ocmin < 0 || dest->attrs.ocmin > 100) {
+ if(dest->attrs.ocmin > 100) {
dest->attrs.ocmin = 0;
}
- if(dest->attrs.ocrate <= 0 || dest->attrs.ocrate > 100) {
+ if(dest->attrs.ocrate > 100) {
dest->attrs.ocrate = 0;
}
if(dest->attrs.ocrate < dest->attrs.ocmin) {