summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-04-13 18:40:12 +0300
committerToomas Soome <tsoome@me.com>2020-09-08 08:53:57 +0300
commit93d26c05275be2c44aedd16705237484fc0a0990 (patch)
treee1bedddb1d3f039eeb8a5451b65a403d4cfea0a4
parentba12489a763ade223e478c59fdc4cb752fcba568 (diff)
downloadillumos-joyent-93d26c05275be2c44aedd16705237484fc0a0990.tar.gz
13015 fruaccess: comparison between pointer and zero character constant
Reviewed by: Igor Kozhukhov <igor@dilos.org> Reviewed by: Sebastian Wiedenroth <wiedi@frubar.net> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c
index 1bb24230cd..82f7262de7 100644
--- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c
+++ b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c
@@ -639,9 +639,9 @@ get_container_info(const char *def_file, const char *cont_desc_str,
token = tokenizer(buf, "#", &field, &matched);
/* find the names */
token = tokenizer(buf, ":", &field, &matched);
- if (token != 0x00) {
+ if (token != NULL) {
token = tokenizer(token, "|", &item, &matched);
- while (token != 0x00) {
+ while (token != NULL) {
if (strcmp(token, cont_desc_str) == 0) {
foundIt = 1;
goto found;
@@ -649,7 +649,7 @@ get_container_info(const char *def_file, const char *cont_desc_str,
token = tokenizer(item, "|", &item, &matched);
}
/* check the last remaining item */
- if ((item != 0x00) &&
+ if ((item != NULL) &&
(strcmp(item, cont_desc_str) == 0)) {
foundIt = 1;
goto found;
@@ -660,16 +660,16 @@ get_container_info(const char *def_file, const char *cont_desc_str,
found :
if (foundIt == 1) {
token = tokenizer(field, ":", &field, &matched);
- if (token == 0x00) {
+ if (token == NULL) {
(void) fclose(file);
return (-1);
}
cont_info->header_ver = (headerrev_t)atoi(token);
token = tokenizer(field, ":\n", &field, &matched);
- while (token != 0x00) {
+ while (token != NULL) {
token = tokenizer(token, ",", &item, &matched);
- if (token == 0x00) {
+ if (token == NULL) {
(void) fclose(file);
return (-1);
}
@@ -696,7 +696,7 @@ found :
}
token = tokenizer(item, ",", &item, &matched);
- if (token == 0x00) {
+ if (token == NULL) {
(void) fclose(file);
return (-1);
}
@@ -708,12 +708,12 @@ found :
* data interpreter
*/
token = tokenizer(item, ",", &item, &matched);
- if (token == 0x00) {
+ if (token == NULL) {
(void) fclose(file);
return (-1);
}
}
- if (item == '\0') {
+ if (*item == '\0') {
(void) fclose(file);
return (-1);
}