From a6292f2a6dbc01596fe0c46318877fc4186a5f7f Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 8 Feb 2012 11:36:18 +0000 Subject: [PATCH] Remove unneeded assignments Variables have (or will have) those values set. --- daemons/cmirrord/functions.c | 2 +- daemons/dmeventd/dmeventd.c | 4 +--- libdm/libdm-deptree.c | 4 ---- tools/lvm.c | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c index 347966838..b8689b483 100644 --- a/daemons/cmirrord/functions.c +++ b/daemons/cmirrord/functions.c @@ -372,7 +372,7 @@ static int _clog_ctr(char *uuid, uint64_t luid, enum sync log_sync = DEFAULTSYNC; uint32_t block_on_error = 0; - int disk_log = 0; + int disk_log; char disk_path[128]; int unlink_path = 0; long page_size; diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index b98bd6e51..cf78e950d 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -448,7 +448,7 @@ static int _get_status(struct message_data *message_data) { struct dm_event_daemon_message *msg = message_data->msg; struct thread_status *thread; - int i = 0, j = 0; + int i, j; int ret = -1; int count = dm_list_size(&_thread_registry); int size = 0, current = 0; @@ -1170,8 +1170,6 @@ static int _get_registered_dev(struct message_data *message_data, int next) if (!hit) goto out; - thread = hit; - while (1) { if (dm_list_end(&_thread_registry, &thread->list)) goto out; diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index f43fd12f4..062d32da7 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -739,10 +739,6 @@ static int _deps(struct dm_task **dmt, struct dm_pool *mem, uint32_t major, uint *deps = NULL; info->major = major; info->minor = minor; - info->exists = 0; - info->live_table = 0; - info->inactive_table = 0; - info->read_only = 0; return 1; } diff --git a/tools/lvm.c b/tools/lvm.c index f94c685b2..e002a761e 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -60,7 +60,7 @@ static char *_list_args(const char *text, int state) /* Initialise if this is a new completion attempt */ if (!state) { char *s = rl_line_buffer; - int j = 0; + int j; match_no = 0; com = NULL; -- 2.43.5