diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c index 96eec9228..611f6bfcc 100644 --- a/daemons/clvmd/clvmd-command.c +++ b/daemons/clvmd/clvmd-command.c @@ -307,9 +307,8 @@ int do_post_command(struct local_client *client) init_test(0); switch (header->cmd) { case CLVMD_CMD_TEST: - status = - sync_unlock("CLVMD_TEST", (int) (long) client->bits.localsock.private); - client->bits.localsock.private = 0; + status = sync_unlock("CLVMD_TEST", (int) (long) client->bits.localsock.private); + client->bits.localsock.private = NULL; break; case CLVMD_CMD_LOCK_LV: @@ -350,7 +349,7 @@ void cmd_client_cleanup(struct local_client *client) } dm_hash_destroy(lock_hash); - client->bits.localsock.private = 0; + client->bits.localsock.private = NULL; } diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index c319013f1..0a8d59128 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -724,9 +724,8 @@ static int local_pipe_callback(struct local_client *thisfd, char *buf, log_sys_error("close", "local_pipe"); /* Clear out the cross-link */ - if (thisfd->bits.pipe.client != NULL) - thisfd->bits.pipe.client->bits.localsock.pipe_client = - NULL; + if (thisfd->bits.pipe.client) + thisfd->bits.pipe.client->bits.localsock.pipe_client = NULL; /* Reap child thread */ if (thisfd->bits.pipe.threadid) { @@ -1811,7 +1810,7 @@ next_pre: } pthread_mutex_unlock(&client->bits.localsock.mutex); DEBUGLOG("Subthread finished\n"); - pthread_exit((void *) 0); + pthread_exit(NULL); } /* Process a command on the local node and store the result */