Browse Source

pv_headers: proper pointer comparison for returned value

Daniel-Constantin Mierla 4 tháng trước cách đây
mục cha
commit
c2f36a2c4f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/modules/pv_headers/pvh_xavp.c

+ 1 - 1
src/modules/pv_headers/pvh_xavp.c

@@ -520,7 +520,7 @@ int pvh_clone_branch_xavi(struct sip_msg *msg, str *xname)
 		if(sub->val.type == SR_XTYPE_DATA)
 			continue;
 		if(pvh_xavi_append_value(&sub->name, &sub->val, &br_xavi->val.v.xavp)
-				< 0) {
+				== NULL) {
 			LM_ERR("cannot clone xavi %.*s\n", sub->name.len, sub->name.s);
 			return -1;
 		}