Skip to content

Commit

Permalink
ims_registrar_pcscf: fix compiler warnings
Browse files Browse the repository at this point in the history
> ul_callback.c: In function 'send_partial_publish':
> ul_callback.c:258:5: warning: 'body' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   if (body) {
>      ^
  • Loading branch information
linuxmaniac committed Jan 16, 2017
1 parent 73557ec commit 6af1dee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/ims_registrar_pcscf/ul_callback.c
Expand Up @@ -193,6 +193,7 @@ int send_partial_publish(ppublic_t *impu, struct pcontact *c, int type)
str p_asserted_identity_header;
str publ_id;
reginfo_event_t *new_event;
str *body = NULL;

content_type.s = "application/reginfo+xml";
content_type.len = 23;
Expand All @@ -216,7 +217,7 @@ int send_partial_publish(ppublic_t *impu, struct pcontact *c, int type)
LM_DBG("p_asserted_identity_header: [%.*s]", p_asserted_identity_header.len, p_asserted_identity_header.s);

LM_DBG("Sending publish\n");
str *body = build_reginfo_partial(impu, c, type);
body = build_reginfo_partial(impu, c, type);

if (body == NULL || body->s == NULL) {
LM_ERR("Error on creating XML-Body for publish\n");
Expand Down

0 comments on commit 6af1dee

Please sign in to comment.