Module: kamailio Branch: master Commit: 26d1426cfeb926ee440542716e7365d16b627801 URL: https://github.com/kamailio/kamailio/commit/26d1426cfeb926ee440542716e7365d1...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2016-06-06T12:05:39+02:00
cdp: fix compilation warnings
---
Modified: modules/cdp/session.c
---
Diff: https://github.com/kamailio/kamailio/commit/26d1426cfeb926ee440542716e7365d1... Patch: https://github.com/kamailio/kamailio/commit/26d1426cfeb926ee440542716e7365d1...
---
diff --git a/modules/cdp/session.c b/modules/cdp/session.c index f418204..3c904c3 100644 --- a/modules/cdp/session.c +++ b/modules/cdp/session.c @@ -73,7 +73,7 @@ unsigned int *session_id2; /**< counter for second part of the session id */ inline void AAASessionsLock(unsigned int hash) { if(destroy_modules_phase()) return; - if ( hash >=0 && hash < sessions_hash_size ){ + if ( hash < sessions_hash_size ){ lock_get(sessions[hash].lock); } else { @@ -88,7 +88,7 @@ inline void AAASessionsUnlock(unsigned int hash) { if(destroy_modules_phase()) return;
- if ( hash >=0 && hash < sessions_hash_size ){ + if ( hash < sessions_hash_size ){ lock_release(sessions[hash].lock); } else { @@ -330,7 +330,7 @@ void del_session(cdp_session_t *x) if (!x) return;
hash = x->hash; - if (hash < 0 || hash >= sessions_hash_size) { + if (hash >= sessions_hash_size) { LM_ERR("del_session: x->hash :%d out of range of sessions_hash_size: %d !\n",hash, sessions_hash_size); return; }