summaryrefslogtreecommitdiff
path: root/usr/src/lib/libds
diff options
context:
space:
mode:
authorPeter Tribble <peter.tribble@gmail.com>2019-08-26 22:33:03 +0100
committerPeter Tribble <peter.tribble@gmail.com>2019-09-07 11:43:05 +0100
commit53bfe442a2e3c2938be0ac7b2b05d096689c2ea6 (patch)
tree32eea5d3d15339e294a37e7a3802b215cc8179d7 /usr/src/lib/libds
parent9cb0a1d4446fe891a01d01e07b2e27f0177c84cd (diff)
downloadillumos-gate-53bfe442a2e3c2938be0ac7b2b05d096689c2ea6.tar.gz
11631 SPARC NULL pointer error in libds
Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/lib/libds')
-rw-r--r--usr/src/lib/libds/common/libds.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/lib/libds/common/libds.c b/usr/src/lib/libds/common/libds.c
index 274b90132a..1e8673573c 100644
--- a/usr/src/lib/libds/common/libds.c
+++ b/usr/src/lib/libds/common/libds.c
@@ -102,7 +102,7 @@ ds_new_dslibentry(void)
int newndslib;
dslibentry_t *dsp;
- if ((dsp = ds_hdl_to_dslibentry(NULL)) != NULL)
+ if ((dsp = ds_hdl_to_dslibentry(0)) != NULL)
return (dsp);
/* double the size */
@@ -125,7 +125,7 @@ ds_service_count(char *service, boolean_t is_client)
uint_t count = 0;
for (i = 0, dsp = dslibtab; i < ndslib; i++, dsp++) {
- if (dsp->dsl_hdl != NULL &&
+ if (dsp->dsl_hdl != 0 &&
strcmp(dsp->dsl_service, service) == 0 &&
(dsp->dsl_flags & VLDS_REG_CLIENT) == is_client_flag) {
count++;
@@ -142,7 +142,7 @@ ds_lookup_dslibentry(char *service, boolean_t is_client)
uint_t is_client_flag = is_client ? VLDS_REG_CLIENT : 0;
for (i = 0, dsp = dslibtab; i < ndslib; i++, dsp++) {
- if (dsp->dsl_hdl != NULL &&
+ if (dsp->dsl_hdl != 0 &&
strcmp(dsp->dsl_service, service) == 0 &&
(dsp->dsl_flags & VLDS_REG_CLIENT) == is_client_flag) {
return (dsp);
@@ -201,7 +201,7 @@ ds_free_dslibentry(dslibentry_t *dsp, int force_unreg)
(dsp->dsl_flags & VLDS_REG_CLIENT) != 0);
if ((nhdls == 1 && force_unreg) || nhdls >= 2) {
- dsp->dsl_hdl = NULL;
+ dsp->dsl_hdl = 0;
if (dsp->dsl_service) {
free(dsp->dsl_service);
}
@@ -297,7 +297,7 @@ static void
ds_string_arg(vlds_string_t *dsp, char *str)
{
if (str == NULL) {
- dsp->vlds_strp = NULL;
+ dsp->vlds_strp = 0;
dsp->vlds_strlen = 0;
} else {
dsp->vlds_strp = PTRTOUINT64(str);
@@ -714,7 +714,7 @@ ds_fini(void)
if (ndslib > 0) {
(void) mutex_lock(&dslib_lock);
for (i = 0, dsp = dslibtab; i < ndslib; i++, dsp++) {
- if (dsp->dsl_hdl == NULL)
+ if (dsp->dsl_hdl == 0)
continue;
if (dsp->dsl_service) {
free(dsp->dsl_service);