X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseLib%2FLowBitSet32.c;h=64300367d638378cf011510ced2089645edbf4f0;hb=775180651d4bd91cc021a0a4d6c229848dde0599;hp=5a21245264cd3d1422e719a3d9075551ca81bc42;hpb=878ddf1fc3540a715f63594ed22b6929e881afb4;p=mirror_edk2.git diff --git a/MdePkg/Library/BaseLib/LowBitSet32.c b/MdePkg/Library/BaseLib/LowBitSet32.c index 5a21245264..64300367d6 100644 --- a/MdePkg/Library/BaseLib/LowBitSet32.c +++ b/MdePkg/Library/BaseLib/LowBitSet32.c @@ -1,17 +1,20 @@ /** @file Math worker functions. - Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + http://opensource.org/licenses/bsd-license.php. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ + + + #include "BaseLibInternals.h" /** @@ -23,8 +26,8 @@ @param Operand The 32-bit operand to evaluate. - @return Position of the lowest bit set in Operand if found. - @retval -1 Operand is zero. + @retval 0..31 The lowest bit set in Operand was found. + @retval -1 Operand is zero. **/ INTN @@ -39,6 +42,6 @@ LowBitSet32 ( return -1; } - for (BitIndex = 0; (Operand & 1) == 0; BitIndex++, Operand >>= 1); + for (BitIndex = 0; 0 == (Operand & 1); BitIndex++, Operand >>= 1); return BitIndex; }