ArmPkg: Fix Ecc error 3002 in CompilerIntrinsicsLib
This patch fixes the following Ecc reported error: Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=) Brackets are also added to comply to with the coding standard. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
This commit is contained in:
committed by
mergify[bot]
parent
e3fe63ddeb
commit
53aabb978e
@@ -1,6 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2017, Pete Batard. All rights reserved.<BR>
|
||||
// Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
|
||||
//
|
||||
// SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
//
|
||||
@@ -19,8 +20,9 @@ void *memset(void *s, int c, size_t n)
|
||||
{
|
||||
unsigned char *d = s;
|
||||
|
||||
while (n--)
|
||||
while (n-- != 0) {
|
||||
*d++ = (unsigned char)c;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
Reference in New Issue
Block a user