/* Scans a target buffer for a 16-bit value, and returns a pointer to the matching 16-bit value in the target buffer. */
CONST VOID* EFIAPI InternalMemScanMem16(IN CONST VOID *Buffer, IN UINTN Length, IN UINT16 Value)
/* Scans a target buffer for a 16-bit value, and returns a pointer to the matching 16-bit value in the target buffer. */
CONST VOID* EFIAPI InternalMemScanMem16(IN CONST VOID *Buffer, IN UINTN Length, IN UINT16 Value)
{
  CONST UINT16  *Pointer;
  Pointer = (CONST UINT16 *)Buffer;
  do {
    if (*(Pointer++) == Value) {
      return --Pointer;
    }
  } while (--Length != 0);
  return NULL;
}