From d5893e0b04e2ff7182dd7af08af13f046e3ede25 Mon Sep 17 00:00:00 2001 From: eric_tian Date: Tue, 24 Feb 2009 07:57:25 +0000 Subject: fix the bug of calculating subnetmask prefix length. It is a regression issue, which incorrectly take "&" operation as "&&" git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7639 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MdeModulePkg/Universal/Network/IScsiDxe') diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c index 3a727099e4..dd110dfb30 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c @@ -94,7 +94,7 @@ IScsiGetSubnetMaskPrefixLength ( // ReverseMask = ~ReverseMask; - if ((ReverseMask != 0) & ((ReverseMask + 1) != 0)) { + if ((ReverseMask & (ReverseMask + 1)) != 0) { return 0; } -- cgit v1.2.3