diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-07 09:17:56 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-07 09:17:56 +0000 |
commit | a78b08d13b86c86dcfbe1c9e88a66b2b18ee7575 (patch) | |
tree | 9c2d898860f7a253495aaed4e9432277863ecaf0 /MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c | |
parent | f3947f1ac735011e482b5aab452f843ddca6cfe1 (diff) | |
download | edk2-platforms-a78b08d13b86c86dcfbe1c9e88a66b2b18ee7575.tar.xz |
Update the code to following EDK coding style document.
1) Pointer value should compare with NULL.
2) Integer should compare with 0.
3) BOOLEAN should not compare with TRUE or FALSE.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5413 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c')
-rw-r--r-- | MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c index fbf2a0bfbe..d5c32c8ac1 100644 --- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c +++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c @@ -145,7 +145,7 @@ EfiGrowBuffer ( //
// If this is an initial request, buffer will be null with a new buffer size
//
- if (!*Buffer && BufferSize) {
+ if ((*Buffer == NULL) && (BufferSize != 0)) {
*Status = EFI_BUFFER_TOO_SMALL;
}
//
@@ -158,7 +158,7 @@ EfiGrowBuffer ( *Buffer = EfiAllocateZeroPool (BufferSize);
- if (*Buffer) {
+ if (*Buffer != NULL) {
TryAgain = TRUE;
} else {
*Status = EFI_OUT_OF_RESOURCES;
@@ -167,7 +167,7 @@ EfiGrowBuffer ( //
// If there's an error, free the buffer
//
- if (!TryAgain && EFI_ERROR (*Status) && *Buffer) {
+ if (!TryAgain && EFI_ERROR (*Status) && (*Buffer != NULL)) {
SafeFreePool (*Buffer);
*Buffer = NULL;
}
@@ -224,7 +224,7 @@ EfiLibDeleteVariable ( VarBuf = EfiLibGetVariable (VarName, VarGuid);
Status = EFI_NOT_FOUND;
- if (VarBuf) {
+ if (VarBuf != NULL) {
//
// Delete variable from Storage
//
@@ -296,7 +296,7 @@ EfiStrDuplicate ( Size = StrSize (Src);
Dest = EfiAllocateZeroPool (Size);
ASSERT (Dest != NULL);
- if (Dest) {
+ if (Dest != NULL) {
CopyMem (Dest, Src, Size);
}
@@ -393,12 +393,12 @@ EfiReallocatePool ( VOID *NewPool;
NewPool = NULL;
- if (NewSize) {
+ if (NewSize != 0) {
NewPool = EfiAllocateZeroPool (NewSize);
}
- if (OldPool) {
- if (NewPool) {
+ if (OldPool != NULL) {
+ if (NewPool != NULL) {
CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
}
|