summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-21 20:02:01 +0200
committerToomas Soome <tsoome@me.com>2019-06-18 21:53:54 +0300
commitae7ff7d6ac239648a2579a0de5a0a1be3d4e10e6 (patch)
treedd83260080f466235246cedf643cc14ea984b9f1
parentdd6458550ab2996163712b25c080615392bf94d2 (diff)
downloadillumos-joyent-ae7ff7d6ac239648a2579a0de5a0a1be3d4e10e6.tar.gz
11118 libhotplug: NULL pointer errors
Reviewed by: Peter Tribble <peter.tribble@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/lib/libhotplug/common/libhotplug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/lib/libhotplug/common/libhotplug.c b/usr/src/lib/libhotplug/common/libhotplug.c
index 91609f457a..d343bebb2c 100644
--- a/usr/src/lib/libhotplug/common/libhotplug.c
+++ b/usr/src/lib/libhotplug/common/libhotplug.c
@@ -345,14 +345,14 @@ hp_last_change(hp_node_t node)
if (node == NULL) {
i_hp_dprintf("hp_last_change: invalid arguments.\n");
errno = EINVAL;
- return (NULL);
+ return (0);
}
if ((node->hp_type != HP_NODE_CONNECTOR) &&
(node->hp_type != HP_NODE_PORT)) {
i_hp_dprintf("hp_last_change: operation not supported.\n");
errno = ENOTSUP;
- return (NULL);
+ return (0);
}
return (node->hp_last_change);
@@ -794,7 +794,7 @@ hp_unpack(char *packed_buf, size_t packed_len, hp_node_t *retp)
if (nvlist_next_nvpair(nvl, NULL) == NULL) {
nvlist_free(nvl);
errno = EINVAL;
- return (NULL);
+ return (0);
}
for (nvp = NULL; nvp = nvlist_next_nvpair(nvl, nvp); ) {