mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
cleanup: clvmd assign NULL to pointers
Use NULL when assigning to void*.
This commit is contained in:
parent
c824369fbd
commit
2cfe0840d2
@ -307,9 +307,8 @@ int do_post_command(struct local_client *client)
|
|||||||
init_test(0);
|
init_test(0);
|
||||||
switch (header->cmd) {
|
switch (header->cmd) {
|
||||||
case CLVMD_CMD_TEST:
|
case CLVMD_CMD_TEST:
|
||||||
status =
|
status = sync_unlock("CLVMD_TEST", (int) (long) client->bits.localsock.private);
|
||||||
sync_unlock("CLVMD_TEST", (int) (long) client->bits.localsock.private);
|
client->bits.localsock.private = NULL;
|
||||||
client->bits.localsock.private = 0;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLVMD_CMD_LOCK_LV:
|
case CLVMD_CMD_LOCK_LV:
|
||||||
@ -350,7 +349,7 @@ void cmd_client_cleanup(struct local_client *client)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dm_hash_destroy(lock_hash);
|
dm_hash_destroy(lock_hash);
|
||||||
client->bits.localsock.private = 0;
|
client->bits.localsock.private = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -724,9 +724,8 @@ static int local_pipe_callback(struct local_client *thisfd, char *buf,
|
|||||||
log_sys_error("close", "local_pipe");
|
log_sys_error("close", "local_pipe");
|
||||||
|
|
||||||
/* Clear out the cross-link */
|
/* Clear out the cross-link */
|
||||||
if (thisfd->bits.pipe.client != NULL)
|
if (thisfd->bits.pipe.client)
|
||||||
thisfd->bits.pipe.client->bits.localsock.pipe_client =
|
thisfd->bits.pipe.client->bits.localsock.pipe_client = NULL;
|
||||||
NULL;
|
|
||||||
|
|
||||||
/* Reap child thread */
|
/* Reap child thread */
|
||||||
if (thisfd->bits.pipe.threadid) {
|
if (thisfd->bits.pipe.threadid) {
|
||||||
@ -1811,7 +1810,7 @@ next_pre:
|
|||||||
}
|
}
|
||||||
pthread_mutex_unlock(&client->bits.localsock.mutex);
|
pthread_mutex_unlock(&client->bits.localsock.mutex);
|
||||||
DEBUGLOG("Subthread finished\n");
|
DEBUGLOG("Subthread finished\n");
|
||||||
pthread_exit((void *) 0);
|
pthread_exit(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process a command on the local node and store the result */
|
/* Process a command on the local node and store the result */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user