Cleanup of -Wpointer-compare warnings.

This commit is contained in:
Jose Rubio
2019-08-19 18:02:25 +02:00
parent 0d115796c2
commit db7370b62b
3 changed files with 7 additions and 7 deletions

View File

@@ -639,10 +639,11 @@ cm_mbchar(char *str) {
free(buf);
buf = NULL;
}
if ( string == '\0' ) {
if ( *string == '\0' ) {
free(string_head);
string_head = NULL;
} else {
string = NULL;
} else if (string != NULL) {
num_byte = mblen(string, MB_LEN_MAX);
if(num_byte > 0) {
buf = (char *)malloc(num_byte+1);