Module: kamailio
Branch: master
Commit: cbe6cef58da8de7efa18c4e34458a81176d23e42
URL:
https://github.com/kamailio/kamailio/commit/cbe6cef58da8de7efa18c4e34458a81…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-10-11T10:17:34+02:00
keepalive: removed redundant checks
---
Modified: src/modules/keepalive/keepalive_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/cbe6cef58da8de7efa18c4e34458a81…
Patch:
https://github.com/kamailio/kamailio/commit/cbe6cef58da8de7efa18c4e34458a81…
---
diff --git a/src/modules/keepalive/keepalive_api.c
b/src/modules/keepalive/keepalive_api.c
index d68e97e374b..e8b1e044be8 100644
--- a/src/modules/keepalive/keepalive_api.c
+++ b/src/modules/keepalive/keepalive_api.c
@@ -224,10 +224,7 @@ int ka_find_destination(str *uri, str *owner, ka_dest_t **target,
ka_dest_t **he
ka_dest_t *dest=0 ,*temp=0;
LM_DBG("finding destination: %.*s\n", uri->len, uri->s);
- for(dest = ka_destinations_list->first ;dest; temp=dest, dest= dest->next ){
- if(!dest)
- break;
-
+ for(dest = ka_destinations_list->first; dest; temp=dest, dest=dest->next) {
if (STR_EQ(*uri, dest->uri) && STR_EQ(*owner, dest->owner)){
*head = temp;
*target = dest;
@@ -255,10 +252,7 @@ int ka_find_destination_by_uuid(str uuid, ka_dest_t **target,
ka_dest_t **head){
LM_DBG("finding destination with uuid:%.*s\n", uuid.len, uuid.s);
- for(dest = ka_destinations_list->first ;dest ; temp = dest, dest = dest->next ){
- if(!dest)
- break;
-
+ for(dest = ka_destinations_list->first; dest; temp = dest, dest = dest->next) {
if (STR_EQ(uuid, dest->uuid)){
*head = temp;
*target = dest;