Module: kamailio
Branch: master
Commit: a318866c1c0efe4fb73d7f6c3cde538a67daa171
URL:
https://github.com/kamailio/kamailio/commit/a318866c1c0efe4fb73d7f6c3cde538…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-05-14T09:51:07+02:00
ipops: init variables to avoid compiler warnings
- use define wrapper for safety printing null strings
---
Modified: modules/ipops/ipops_pv.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a318866c1c0efe4fb73d7f6c3cde538…
Patch:
https://github.com/kamailio/kamailio/commit/a318866c1c0efe4fb73d7f6c3cde538…
---
diff --git a/modules/ipops/ipops_pv.c b/modules/ipops/ipops_pv.c
index 5010fd7..ecd3ced 100644
--- a/modules/ipops/ipops_pv.c
+++ b/modules/ipops/ipops_pv.c
@@ -861,7 +861,7 @@ int pv_parse_srv_name (pv_spec_t *sp, str *in)
char *pstr;
int i, pos, sign;
srv_pv_t *dpv;
- str pvi, pvk, pvn;
+ str pvi = {0}, pvk = {0}, pvn = {0};
/**********
* o alloc/init pvid structure
@@ -991,7 +991,7 @@ int pv_parse_srv_name (pv_spec_t *sp, str *in)
if (skip_over (in, pos, 1) != in->len)
goto error;
LM_DBG ("srvquery (%.*s => %.*s [%.*s])\n",
- pvn.len, pvn.s, pvk.len, pvk.s, pvi.len, pvi.s);
+ pvn.len, ZSW(pvn.s), pvk.len, ZSW(pvk.s), pvi.len, ZSW(pvi.s));
dpv->item = sr_srv_add_item (&pvn, 0);
if (!dpv->item)
goto error;