NULL is a pointer, not string terminator

Replace some instances of NULL to '\0', when
referring to string terminator.
This commit is contained in:
Marcin Cieslak
2012-08-13 12:08:03 +02:00
committed by Jon Trulson
parent 3b06b6a6b7
commit 706fccb50e
14 changed files with 32 additions and 32 deletions

View File

@@ -1134,15 +1134,15 @@ contain_substr(char *str1, char *str2)
{
int i, len;
if (str2 == NULL || *str2 == NULL)
if (str2 == NULL || *str2 == '\0')
return (B_TRUE);
if (str1 == NULL || *str1 == NULL) {
if (str1 == NULL || *str1 == '\0') {
return (B_FALSE);
} else {
len = strlen(str2);
for (i = 0; str1[i] != NULL; i++) {
for (i = 0; str1[i] != '\0'; i++) {
if (strncasecmp(&str1[i], str2, len) == 0)
return (B_TRUE);
}