Clean-up: uri_parse_str_urls: skip allocation when no uris are parsed
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 5 Mar 2021 13:01:21 +0000 (08:01 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 5 Mar 2021 13:07:14 +0000 (08:07 -0500)
commitbf6df41f7d8d8faf4dd4176cc98cfb811e9c8d1f
treef3a3834e53db9105b3c33934a1ad4cb0e3bb5af7
parent5c6ca80951867d21c8a91b36560f0e18e4d2f232
Clean-up: uri_parse_str_urls: skip allocation when no uris are parsed

Meant as a way to silence a bogus Coverity warning. Skip the allocation
if both the ctrl and data uri parsing fails.

Coverity is confused and reports that uri_parse_str_urls() can return
a negative value after allocating the returned URIs (I don't see how,
and the path it reports is contradictory: 0 + 0 < 0.

I take the opportunity to rename the oddly--named "*_size" variables
which are not a "size", but rather a count of returned uris.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I79a82316ebd49d9fbbc5a8e67da64e44b789e2a7
src/common/uri.c
This page took 0.034886 seconds and 4 git commands to generate.