From 7c207486dba29784d04c67b7d1a97e8cff0a4ff9 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 22 Jan 2019 10:53:35 +0200 Subject: 11139 libcpc: NULL pointer errors Reviewed by: Peter Tribble Approved by: Dan McDonald --- usr/src/lib/libcpc/common/libcpc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr/src/lib/libcpc/common/libcpc.c b/usr/src/lib/libcpc/common/libcpc.c index de6c13d33c..9e8cb62d9c 100644 --- a/usr/src/lib/libcpc/common/libcpc.c +++ b/usr/src/lib/libcpc/common/libcpc.c @@ -203,7 +203,7 @@ cpc_set_create(cpc_t *cpc) set->cs_fd = -1; set->cs_pctx = NULL; set->cs_id = -1; - set->cs_thr = NULL; + set->cs_thr = 0; sigblocked = cpc_lock(cpc); set->cs_next = cpc->cpc_sets; @@ -617,7 +617,7 @@ cpc_unbind(cpc_t *cpc, cpc_set_t *set) break; } - set->cs_thr = NULL; + set->cs_thr = 0; set->cs_id = -1; set->cs_state = CS_UNBOUND; if (ret != 0) @@ -781,7 +781,7 @@ cpc_get_list(int which, int arg) void cpc_walk_requests(cpc_t *cpc, cpc_set_t *set, void *arg, void (*action)(void *arg, int index, const char *event, uint64_t preset, - uint_t flags, int nattrs, const cpc_attr_t *attrs)) + uint_t flags, int nattrs, const cpc_attr_t *attrs)) { cpc_request_t *rp; cpc_attr_t *attrs = NULL; @@ -871,7 +871,7 @@ err: /*ARGSUSED*/ void cpc_walk_events_all(cpc_t *cpc, void *arg, - void (*action)(void *arg, const char *event)) + void (*action)(void *arg, const char *event)) { cpc_walk_events_impl(cpc, arg, action, 0); } @@ -880,7 +880,7 @@ cpc_walk_events_all(cpc_t *cpc, void *arg, /*ARGSUSED*/ void cpc_walk_generic_events_all(cpc_t *cpc, void *arg, - void (*action)(void *arg, const char *event)) + void (*action)(void *arg, const char *event)) { cpc_walk_events_impl(cpc, arg, action, 1); } -- cgit v1.2.3