Merge /u/jrubio/cdesktopenv/ branch pointer-compare into master

https://sourceforge.net/p/cdesktopenv/code/merge-requests/8/
This commit is contained in:
Jon Trulson
2019-09-12 22:11:52 +00:00
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);

View File

@@ -269,7 +269,7 @@ extern char*
get_char_prop(Props *p, Props_op op) {
Props_entry *step = p_get_props_entry(p, op);
if (!step || !step->property_value || step->property_value == '\0')
if (!step || !step->property_value || *step->property_value == '\0')
return get_char_prop_default(op);
return (step->property_value);
}
@@ -315,7 +315,7 @@ extern int
get_int_prop(Props *p, Props_op op) {
Props_entry *step = p_get_props_entry(p, op);
if (!step || !step->property_value || step->property_value == '\0')
if (!step || !step->property_value || *step->property_value == '\0')
return (atoi(get_char_prop_default(op)));
return (atoi(step->property_value));
}