From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milan Broz Date: Tue, 21 Dec 2010 18:55:58 +0100 Subject: [PATCH 19/23] Warning - dead code problem elimination In-Reply-To: <2e3abc21f31d172f75c96f74e483dfbee6d9dd07.1292945707.git.zkabelac@redhat.com> References: <2e3abc21f31d172f75c96f74e483dfbee6d9dd07.1292945707.git.zkabelac@redhat.com> Message-ID: <4D10EA2E.8080404@redhat.com> List-Id: To: lvm-devel@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 12/21/2010 04:41 PM, Zdenek Kabelac wrote: > @@ -653,8 +653,7 @@ static int _event_wait(struct thread_status *thread, struct dm_task **task) > if (dm_task_run(dmt)) { > thread->current_events |= DM_EVENT_DEVICE_ERROR; > ret = DM_WAIT_INTR; > - > - if ((ret = dm_task_get_info(dmt, &info))) > + if (dm_task_get_info(dmt, &info)) > thread->event_nr = info.event_nr; > } else if (thread->events & DM_EVENT_TIMEOUT && errno == EINTR) { > thread->current_events |= DM_EVENT_TIMEOUT; #define DM_WAIT_RETRY 0 #define DM_WAIT_INTR 1 dm_task_get_info returns 0/1 - it is probably intended such way? I think you should return DM_WAIT_RETRY if info fails then (so the code _was_ correct)? mornfall? :) Milan