comparison 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
comparison
equal deleted inserted replaced
1593:24508cb54f87 1594:137dbd05ceab
253 uint8_t initial = **text; 253 uint8_t initial = **text;
254 (*text)++; 254 (*text)++;
255 if (initial < 0x80) { 255 if (initial < 0x80) {
256 return initial; 256 return initial;
257 } 257 }
258 int base; 258 int base = 0;
259 uint8_t extended_bytes; 259 uint8_t extended_bytes = 0;
260 if ((initial & 0xE0) == 0xC0) { 260 if ((initial & 0xE0) == 0xC0) {
261 base = 0x80; 261 base = 0x80;
262 initial &= 0x1F; 262 initial &= 0x1F;
263 extended_bytes = 1; 263 extended_bytes = 1;
264 } else if ((initial & 0xF0) == 0xE0) { 264 } else if ((initial & 0xF0) == 0xE0) {
871 ret = NULL; 871 ret = NULL;
872 } 872 }
873 } else { 873 } else {
874 ret = NULL; 874 ret = NULL;
875 } 875 }
876 fclose(f);
876 return ret; 877 return ret;
877 } 878 }
878 879
879 880
880 #ifdef _WIN32 881 #ifdef _WIN32