From b2681f5eb82eaba91270920e3e0a72a6fbf851d3 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 28 Oct 2005 23:14:06 +0000 Subject: [PATCH] Fixed gcc warnings (NULL is a pointer, '\0' is a zero character). --- src/libCom/calc/postfix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libCom/calc/postfix.c b/src/libCom/calc/postfix.c index 9bc529b30..6e9667120 100644 --- a/src/libCom/calc/postfix.c +++ b/src/libCom/calc/postfix.c @@ -226,7 +226,7 @@ static int find_element(pbuffer,pelement,pno_bytes) /* compare the string to each element in the element table */ *pelement = &elements[0]; - while ((*pelement)->element[0] != NULL){ + while ((*pelement)->element[0] != '\0'){ if (strncmp(pbuffer,(*pelement)->element, strlen((*pelement)->element)) == 0){ *pno_bytes += strlen((*pelement)->element); @@ -249,13 +249,13 @@ short *pno_bytes; { /* get the next expression element from the infix expression */ - if (*pinfix == NULL) return(END); + if (*pinfix == '\0') return(END); *pno_bytes = 0; while (*pinfix == 0x20){ *pno_bytes += 1; pinfix++; } - if (*pinfix == NULL) return(END); + if (*pinfix == '\0') return(END); if (!find_element(pinfix,pelement,pno_bytes)) return(UNKNOWN_ELEMENT); return(FINE);