1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00

cleanup: clvmd assign NULL to pointers

Use NULL when assigning to void*.
This commit is contained in:
Zdenek Kabelac 2014-03-10 12:16:09 +01:00
parent c824369fbd
commit 2cfe0840d2
2 changed files with 6 additions and 8 deletions

View File

@ -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;
}

View File

@ -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 */