1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

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

@ -2379,7 +2379,7 @@ ProcessTable(
/* /*
* are any alignment characters specified? * are any alignment characters specified?
*/ */
if (NULL != alignCharacters && '\0' != alignCharacters) if (NULL != alignCharacters && '\0' != *alignCharacters)
{ {
int len = mblen(alignCharacters, MB_CUR_MAX); int len = mblen(alignCharacters, MB_CUR_MAX);
@ -3865,8 +3865,7 @@ ProcessContainer(
* check to see if the character is 'valid'. * check to see if the character is 'valid'.
* if not, default out of JUSTIFY_CHAR * if not, default out of JUSTIFY_CHAR
*/ */
if (NULL != layout->info.align_char || if ( (NULL != layout->info.align_char) && ( '\0' != *layout->info.align_char))
'\0' == layout->info.align_char)
layout->txt_justify = _DtCvJUSTIFY_LEFT; layout->txt_justify = _DtCvJUSTIFY_LEFT;
} }
} }

View file

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

View file

@ -269,7 +269,7 @@ extern char*
get_char_prop(Props *p, Props_op op) { get_char_prop(Props *p, Props_op op) {
Props_entry *step = p_get_props_entry(p, 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 get_char_prop_default(op);
return (step->property_value); return (step->property_value);
} }
@ -315,7 +315,7 @@ extern int
get_int_prop(Props *p, Props_op op) { get_int_prop(Props *p, Props_op op) {
Props_entry *step = p_get_props_entry(p, 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(get_char_prop_default(op)));
return (atoi(step->property_value)); return (atoi(step->property_value));
} }