Module: kamailio Branch: master Commit: 153f1fe21f3ee328262fc834eee2b6f554e30759 URL: https://github.com/kamailio/kamailio/commit/153f1fe21f3ee328262fc834eee2b6f5...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2017-01-16T09:37:52+01:00
ims_isc: fix compiler warnings
third_party_reg.c: In function 'r_send_third_party_reg': third_party_reg.c:349:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (r->path.len) ^~ third_party_reg.c:352:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' str pauri = {0,0}; ^~~
---
Modified: src/modules/ims_isc/third_party_reg.c
---
Diff: https://github.com/kamailio/kamailio/commit/153f1fe21f3ee328262fc834eee2b6f5... Patch: https://github.com/kamailio/kamailio/commit/153f1fe21f3ee328262fc834eee2b6f5...
---
diff --git a/src/modules/ims_isc/third_party_reg.c b/src/modules/ims_isc/third_party_reg.c index 5d7fe96..b54d4e0 100644 --- a/src/modules/ims_isc/third_party_reg.c +++ b/src/modules/ims_isc/third_party_reg.c @@ -335,20 +335,21 @@ int r_send_third_party_reg(r_third_party_registration *r, int expires) {
h.len += contact_s.len + isc_my_uri_sip.len + contact_e.len;
- if (r->pvni.len) - h.len += p_visited_network_id_s.len + p_visited_network_id_e.len - + r->pvni.len; - - if (r->pani.len) - h.len += p_access_network_info_s.len + p_access_network_info_e.len - + r->pani.len; - - if (r->cv.len) - h.len += p_charging_vector_s.len + p_charging_vector_e.len + r->cv.len; - - if (r->path.len) - h.len += path_s.len + path_e.len + r->path.len + 6/*',' and ';lr' and '<' and '>'*/ + r->from.len /*adding our own address to path*/; - + if (r->pvni.len) { + h.len += p_visited_network_id_s.len + p_visited_network_id_e.len + + r->pvni.len; + } + if (r->pani.len) { + h.len += p_access_network_info_s.len + p_access_network_info_e.len + + r->pani.len; + } + if (r->cv.len) { + h.len += p_charging_vector_s.len + p_charging_vector_e.len + r->cv.len; + } + if (r->path.len) { + h.len += path_s.len + path_e.len + r->path.len + 6/*',' and ';lr' and '<' and '>'*/ + + r->from.len /*adding our own address to path*/; + } str pauri = {0,0}; if (p_associated_uri.data_len > 0)