mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
test: fix memoryZeroed() in ULTs
first byte in the buffer was not checked what resulted in incorrect check if memory was zeroed, Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2f5be7a48d
commit
6c2f5df6c3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -42,7 +42,7 @@
|
||||
inline bool memoryZeroed(const void *mem, const size_t size) {
|
||||
size_t sizeLeft = (size_t)size;
|
||||
bool memoryZeroed = true;
|
||||
while (--sizeLeft) {
|
||||
while (sizeLeft--) {
|
||||
uint8_t *pMem = (uint8_t *)mem;
|
||||
if (pMem[sizeLeft] != 0) {
|
||||
memoryZeroed = false;
|
||||
|
||||
Reference in New Issue
Block a user