lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150810000216.GA645@swordfish>
Date:	Mon, 10 Aug 2015 09:02:16 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:	Salah Triki <salah.triki@....org>
Cc:	minchan@...nel.org, ngupta@...are.org,
	sergey.senozhatsky.work@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3 1/1] zram: Remove useless check

On (08/07/15 19:06), Salah Triki wrote:
> Date: Fri,  7 Aug 2015 19:06:42 +0100
> From: Salah Triki <salah.triki@....org>
> To: minchan@...nel.org, ngupta@...are.org, sergey.senozhatsky.work@...il.com
> Cc: salah.triki@....org, linux-kernel@...r.kernel.org
> Subject: [PATCH V3 1/1] zram: Remove useless check
> X-Mailer: git-send-email 1.9.1
> 
> lzo1x_1_compress always returns LZO_E_OK that is equal to 0. Thus, the
> check of the return value is useless.
> 
> Signed-off-by: Salah Triki <salah.triki@....org>
> ---
>  drivers/block/zram/zcomp_lzo.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/block/zram/zcomp_lzo.c b/drivers/block/zram/zcomp_lzo.c
> index da1bc47..3cf30c9 100644
> --- a/drivers/block/zram/zcomp_lzo.c
> +++ b/drivers/block/zram/zcomp_lzo.c
> @@ -26,8 +26,7 @@ static void lzo_destroy(void *private)
>  static int lzo_compress(const unsigned char *src, unsigned char *dst,
>  		size_t *dst_len, void *private)
>  {
> -	int ret = lzo1x_1_compress(src, PAGE_SIZE, dst, dst_len, private);
> -	return ret == LZO_E_OK ? 0 : ret;
> +	return lzo1x_1_compress(src, PAGE_SIZE, dst, dst_len, private);
>  }

NACK. it may change someday, we don't control it.
the check must stay.

	-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ