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] [thread-next>] [day] [month] [year] [list]
Message-Id: <1419552286-8492-6-git-send-email-jmmahler@gmail.com>
Date:	Thu, 25 Dec 2014 16:04:45 -0800
From:	Jeremiah Mahler <jmmahler@...il.com>
To:	Oleg Drokin <oleg.drokin@...el.com>
Cc:	Andreas Dilger <andreas.dilger@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Peng Tao <bergwolf@...il.com>,
	"Peter Zijlstra (Intel)" <peterz@...radead.org>,
	Julia Lawall <Julia.Lawall@...6.fr>,
	Kirill Tkhai <ktkhai@...allels.com>,
	Joe Perches <joe@...ches.com>,
	Zi Shen Lim <zlim.lnx@...il.com>,
	Dmitry Eremin <dmitry.eremin@...el.com>,
	Masaru Nomura <massa.nomura@...il.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	James A Shackleford <shack@...ux.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Jeremiah Mahler <jmmahler@...il.com>
Subject: [PATCH 5/6] staging: lustre: replace MIN with min_t, remove cast

Switch from MIN to min_t and remove the previous cast of the second
argument to int.

Signed-off-by: Jeremiah Mahler <jmmahler@...il.com>
---
 drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 76eb238..d11686f 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -1530,7 +1530,7 @@ lnet_parse_reply(lnet_ni_t *ni, lnet_msg_t *msg)
 	LASSERT(md->md_offset == 0);
 
 	rlength = hdr->payload_length;
-	mlength = MIN(rlength, (int)md->md_length);
+	mlength = min_t(int, rlength, md->md_length);
 
 	if (mlength < rlength &&
 	    (md->md_options & LNET_MD_TRUNCATE) == 0) {
-- 
2.1.4

--
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