[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 19/23] Warning - dead code problem elimination



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]