aboutsummaryrefslogtreecommitdiff
path: root/iri.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-06-16 15:04:42 +0000
committerOmar Polo <op@omarpolo.com>2021-06-16 15:04:42 +0000
commit80fbf1e934ed1e2dafea65e88bb91a501f175a3b (patch)
treeb5bf1ac0959024c5648fd0b01a465d3213a22b68 /iri.c
parent2d383cbd5f19052f4f4d154e0d5e4ec387b12690 (diff)
make sure l is always initialized
I can't think of cases where we reach serialize_iri and path is NULL, but let's keep the safe side and initialize l. gcc 8 found this, clang didn't.
Diffstat (limited to 'iri.c')
-rw-r--r--iri.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iri.c b/iri.c
index e1552d6..64fcca2 100644
--- a/iri.c
+++ b/iri.c
@@ -424,7 +424,7 @@ trim_req_iri(char *iri, const char **err)
int
serialize_iri(struct iri *i, char *buf, size_t len)
{
- size_t l;
+ size_t l = 0;
/* in ex.c we receive empty "" strings as NULL */
if (i->schema == NULL || i->host == NULL) {