Skip to content

Commit

Permalink
usrloc: Fix compiler warning
Browse files Browse the repository at this point in the history
dlist.c: In function ‘get_all_ucontacts’:
dlist.c:750:37: error: ‘next_hop_host’ may be used uninitialized in this
			    function [-Werror=maybe-uninitialized]
      ((struct proxy_l *)cp)->name.s = next_hop_host;
                                     ^
  • Loading branch information
liviuchircu committed Apr 23, 2019
1 parent 28a3188 commit 95edbd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/usrloc/dlist.c
Expand Up @@ -495,7 +495,7 @@ cdb_pack_ping_data(const str *aor, const cdb_pair_t *contact,
memcpy(cp, &path.len, sizeof path.len);
cp += sizeof path.len;
memcpy(cp, path.s, path.len);
if (path.len > 0)
if (path.len != 0)
next_hop_host = cp + (puri.host.s - next_hop_uri.s);
cp += path.len;

Expand Down

0 comments on commit 95edbd2

Please sign in to comment.