Mercurial > repos > blastem
diff util.c @ 1594:137dbd05ceab
Fix some issues identified by cppcheck
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 29 Jun 2018 09:33:23 -0700 |
parents | 31effaadf877 |
children | ab3b465c052c |
line wrap: on
line diff
--- a/util.c Thu Jun 28 09:27:05 2018 -0700 +++ b/util.c Fri Jun 29 09:33:23 2018 -0700 @@ -255,8 +255,8 @@ 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 @@ } else { ret = NULL; } + fclose(f); return ret; }