Skip to content

Commit

Permalink
cdp: fix compilation warnings
Browse files Browse the repository at this point in the history
> peerstatemachine.c:97:19: warning: implicit conversion from enumeration type 'peer_state_t' to different enumeration type 'peer_event_t' [-Wenum-conversion]
>                                         next_event = I_Snd_Conn_Req(p);
>                                                    ~ ^~~~~~~~~~~~~~~~~
> peerstatemachine.c:531:10: warning: implicit conversion from enumeration type 'peer_event_t' to different enumeration type 'peer_state_t' [-Wenum-conversion]
>                 return I_Rcv_Conn_NAck;
>                 ~~~~~~ ^~~~~~~~~~~~~~~
> peerstatemachine.c:534:9: warning: implicit conversion from enumeration type 'peer_event_t' to different enumeration type 'peer_state_t' [-Wenum-conversion]
>         return I_Rcv_Conn_Ack;
>         ~~~~~~ ^~~~~~~~~~~~~~
> 3 warnings generated.
  • Loading branch information
linuxmaniac committed Jun 6, 2016
1 parent 007bd7e commit 26d1426
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/cdp/session.c
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 26d1426

Please sign in to comment.