summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c12
-rwxr-xr-xArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c12
2 files changed, 16 insertions, 8 deletions
diff --git a/ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c b/ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c
index ef78748..54c2701 100755
--- a/ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c
+++ b/ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c
@@ -162,9 +162,10 @@ InternalMemScanMem8 (
Pointer = (CONST UINT8*)Buffer;
do {
- if (*(Pointer++) == Value) {
+ if (*Pointer == Value) {
return Pointer;
}
+ Pointer++;
} while (--Length != 0);
return NULL;
}
@@ -192,9 +193,10 @@ InternalMemScanMem16 (
Pointer = (CONST UINT16*)Buffer;
do {
- if (*(Pointer++) == Value) {
+ if (*Pointer == Value) {
return Pointer;
}
+ Pointer++;
} while (--Length != 0);
return NULL;
}
@@ -222,9 +224,10 @@ InternalMemScanMem32 (
Pointer = (CONST UINT32*)Buffer;
do {
- if (*(Pointer++) == Value) {
+ if (*Pointer == Value) {
return Pointer;
}
+ Pointer++;
} while (--Length != 0);
return NULL;
}
@@ -252,9 +255,10 @@ InternalMemScanMem64 (
Pointer = (CONST UINT64*)Buffer;
do {
- if (*(Pointer++) == Value) {
+ if (*Pointer == Value) {
return Pointer;
}
+ Pointer++;
} while (--Length != 0);
return NULL;
}
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c b/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c
index ef78748..54c2701 100755
--- a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c
+++ b/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c
@@ -162,9 +162,10 @@ InternalMemScanMem8 (
Pointer = (CONST UINT8*)Buffer;
do {
- if (*(Pointer++) == Value) {
+ if (*Pointer == Value) {
return Pointer;
}
+ Pointer++;
} while (--Length != 0);
return NULL;
}
@@ -192,9 +193,10 @@ InternalMemScanMem16 (
Pointer = (CONST UINT16*)Buffer;
do {
- if (*(Pointer++) == Value) {
+ if (*Pointer == Value) {
return Pointer;
}
+ Pointer++;
} while (--Length != 0);
return NULL;
}
@@ -222,9 +224,10 @@ InternalMemScanMem32 (
Pointer = (CONST UINT32*)Buffer;
do {
- if (*(Pointer++) == Value) {
+ if (*Pointer == Value) {
return Pointer;
}
+ Pointer++;
} while (--Length != 0);
return NULL;
}
@@ -252,9 +255,10 @@ InternalMemScanMem64 (
Pointer = (CONST UINT64*)Buffer;
do {
- if (*(Pointer++) == Value) {
+ if (*Pointer == Value) {
return Pointer;
}
+ Pointer++;
} while (--Length != 0);
return NULL;
}