Re: [PATCH 3/6] Fix return code for --detail-platform

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

 



On Wed, 26 Sep 2012 13:42:58 +0200 Maciej Naruszewicz
<maciej.naruszewicz@xxxxxxxxx> wrote:

> Variable 'err' is initially set to 1, so changing its value with
> '|=' won't set it to 0 even if the operation is successful.
> 
> Signed-off-by: Maciej Naruszewicz <maciej.naruszewicz@xxxxxxxxx>
> ---
>  Detail.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Detail.c b/Detail.c
> index 57faf3c..96d1ff6 100644
> --- a/Detail.c
> +++ b/Detail.c
> @@ -640,6 +640,7 @@ int Detail_Platform(struct superswitch *ss, int scan, int verbose, int export, c
>  	if (!scan)
>  		return err;
>  
> +	err = 0;
>  	for (i = 0; superlist[i]; i++) {
>  		struct superswitch *meta = superlist[i];
>  
Good catch.

Applied, thanks.
NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux