[Stgt-devel] [PATCH] Use correct return value of lseek

FUJITA Tomonori fujita.tomonori
Sat Jul 19 17:43:38 CEST 2008


On Fri, 18 Jul 2008 18:37:24 +0200
Albert Pauw <albert.pauw at gmail.com> wrote:

> Just a small patch.
> 
> The wrong return value was checked in the if statement.
> 
> Albert
> 
> --------
> 
> --- bs_ssc.c	2008-07-17 19:19:10.000000000 +0200
> +++ bs_ssc.c.new	2008-07-18 18:34:15.000000000 +0200
> @@ -65,7 +65,7 @@
>  	case REZERO_UNIT:
>  		rew = lseek(fd, 0, SEEK_SET);
>  		curr_pos = lseek(fd, 0, SEEK_CUR);
> -		if (ret)
> +		if (rew)
>  			set_medium_error(&result, &key, &asc);
>  		eprintf("Rewind Successful, File Pointer at %" PRIu64",%m\n",
>  			curr_pos);

I think that the fix is right but what's for the second lseek? Can we
remove it?




More information about the stgt mailing list