Skip to content

Commit

Permalink
modules/ims_qos modules/ims_registrar_scscf: fix comparison of unsign…
Browse files Browse the repository at this point in the history
…ed expression
  • Loading branch information
mslehto committed May 25, 2016
1 parent 63952ac commit 94b4c25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/ims_qos/rx_avp.c
Expand Up @@ -489,7 +489,7 @@ inline int rx_add_media_component_description_avp(AAAMessage *msg, int number, s
// Get A=RS-bandwidth from SDP-Reply:
bandwidth = sdp_b_value(rpl_raw_payload, "RS");
LM_DBG("Answer: Got bandwidth %i from b=RS-Line\n", bandwidth);
if (bandwidth >= 0) {
if (bandwidth > 0) {
// Add AVP
set_4bytes(x,bandwidth);
rs_bw = cdpb.AAACreateAVP(AVP_EPC_RS_Bandwidth,
Expand All @@ -501,7 +501,7 @@ inline int rx_add_media_component_description_avp(AAAMessage *msg, int number, s
// Get A=RS-bandwidth from SDP-Reply:
bandwidth = sdp_b_value(rpl_raw_payload, "RR");
LM_DBG("Answer: Got bandwidth %i from b=RR-Line\n", bandwidth);
if (bandwidth >= 0) {
if (bandwidth > 0) {
// Add AVP
set_4bytes(x,bandwidth);
rr_bw = cdpb.AAACreateAVP(AVP_EPC_RR_Bandwidth,
Expand Down
2 changes: 1 addition & 1 deletion modules/ims_registrar_scscf/save.c
Expand Up @@ -111,7 +111,7 @@ static inline int randomize_expires(int expires, int range) {
static inline int calc_contact_expires(contact_t *c, unsigned int expires_hdr, int sos_reg) {
unsigned int r;

if (expires_hdr >= 0)
if (expires_hdr > 0)
r = expires_hdr;
else {
r = (sos_reg > 0) ? default_registrar_cfg.em_default_expires : default_registrar_cfg.default_expires;
Expand Down

0 comments on commit 94b4c25

Please sign in to comment.