mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: add some comment indents...
Just cleanup things
This commit is contained in:
parent
91eb8927fd
commit
6448428d05
@ -607,6 +607,7 @@ static void _unregister_for_timeout(struct thread_status *thread)
|
||||
dm_list_del(&thread->timeout_list);
|
||||
dm_list_init(&thread->timeout_list);
|
||||
if (dm_list_empty(&_timeout_registry))
|
||||
/* No more work -> wakeup to finish quickly */
|
||||
pthread_cond_signal(&_timeout_cond);
|
||||
}
|
||||
pthread_mutex_unlock(&_timeout_mutex);
|
||||
@ -944,7 +945,7 @@ static int lookup_symbols(void *dl, struct dso_data *data)
|
||||
static struct dso_data *_load_dso(struct message_data *data)
|
||||
{
|
||||
void *dl;
|
||||
struct dso_data *ret = NULL;
|
||||
struct dso_data *ret;
|
||||
|
||||
if (!(dl = dlopen(data->dso_name, RTLD_NOW))) {
|
||||
const char *dlerr = dlerror();
|
||||
@ -1251,9 +1252,8 @@ static int _get_timeout(struct message_data *message_data)
|
||||
|
||||
_lock_mutex();
|
||||
if ((thread = _lookup_thread_status(message_data))) {
|
||||
msg->size =
|
||||
dm_asprintf(&(msg->data), "%s %" PRIu32, message_data->id,
|
||||
thread->timeout);
|
||||
msg->size = dm_asprintf(&(msg->data), "%s %" PRIu32,
|
||||
message_data->id, thread->timeout);
|
||||
} else {
|
||||
msg->data = NULL;
|
||||
msg->size = 0;
|
||||
@ -1971,7 +1971,7 @@ static void restart(void)
|
||||
}
|
||||
message += strlen(message) + 1;
|
||||
}
|
||||
_initial_registrations[count] = 0;
|
||||
_initial_registrations[count] = NULL;
|
||||
|
||||
if (version >= 2) {
|
||||
if (daemon_talk(&fifos, &msg, DM_EVENT_CMD_GET_PARAMETERS, "-", "-", 0, 0)) {
|
||||
|
@ -283,10 +283,9 @@ static int _daemon_read(struct dm_event_fifos *fifos,
|
||||
static int _daemon_write(struct dm_event_fifos *fifos,
|
||||
struct dm_event_daemon_message *msg)
|
||||
{
|
||||
unsigned bytes = 0;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
fd_set fds;
|
||||
|
||||
size_t bytes = 0;
|
||||
size_t size = 2 * sizeof(uint32_t) + msg->size;
|
||||
uint32_t *header = alloca(size);
|
||||
char *buf = (char *)header;
|
||||
@ -308,7 +307,7 @@ static int _daemon_write(struct dm_event_fifos *fifos,
|
||||
}
|
||||
if (ret == 0)
|
||||
break;
|
||||
ret = read(fifos->server, drainbuf, 127);
|
||||
ret = read(fifos->server, drainbuf, sizeof(drainbuf));
|
||||
}
|
||||
|
||||
while (bytes < size) {
|
||||
@ -609,7 +608,7 @@ int dm_event_register_handler(const struct dm_event_handler *dmevh)
|
||||
int ret = 1, err;
|
||||
const char *uuid;
|
||||
struct dm_task *dmt;
|
||||
struct dm_event_daemon_message msg = { 0, 0, NULL };
|
||||
struct dm_event_daemon_message msg = { 0 };
|
||||
|
||||
if (!(dmt = _get_device_info(dmevh)))
|
||||
return_0;
|
||||
@ -643,7 +642,7 @@ int dm_event_unregister_handler(const struct dm_event_handler *dmevh)
|
||||
int ret = 1, err;
|
||||
const char *uuid;
|
||||
struct dm_task *dmt;
|
||||
struct dm_event_daemon_message msg = { 0, 0, NULL };
|
||||
struct dm_event_daemon_message msg = { 0 };
|
||||
|
||||
if (!(dmt = _get_device_info(dmevh)))
|
||||
return_0;
|
||||
@ -810,7 +809,7 @@ int dm_event_get_registered_device(struct dm_event_handler *dmevh, int next)
|
||||
|
||||
int dm_event_get_version(struct dm_event_fifos *fifos, int *version) {
|
||||
char *p;
|
||||
struct dm_event_daemon_message msg = { 0, 0, NULL };
|
||||
struct dm_event_daemon_message msg = { 0 };
|
||||
|
||||
if (daemon_talk(fifos, &msg, DM_EVENT_CMD_HELLO, NULL, NULL, 0, 0))
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user