From aad75c86365b71d625a730a0d42c6537a9016feb Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Fri, 29 Jun 2018 09:33:23 -0700 Subject: Fix some issues identified by cppcheck --- util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 4feca66..7c7fd35 100644 --- a/util.c +++ b/util.c @@ -255,8 +255,8 @@ int utf8_codepoint(const char **text) if (initial < 0x80) { return initial; } - int base; - uint8_t extended_bytes; + int base = 0; + uint8_t extended_bytes = 0; if ((initial & 0xE0) == 0xC0) { base = 0x80; initial &= 0x1F; @@ -873,6 +873,7 @@ char *read_bundled_file(char *name, uint32_t *sizeret) } else { ret = NULL; } + fclose(f); return ret; } -- cgit v1.2.3