Skip to content

Commit dbdbd04

Browse files
fixed reading numentries
potential uninitialized as it is an output variable. Signed-off-by: Zhang, Winston <[email protected]>
1 parent 97cd705 commit dbdbd04

File tree

1 file changed

+1
-1
lines changed
  • unified-runtime/source/adapters/level_zero

1 file changed

+1
-1
lines changed

unified-runtime/source/adapters/level_zero/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ ur_result_t urDeviceGet(
167167
std::copy_n(MatchedDevices.begin(), N, Devices);
168168

169169
if (NumDevices) {
170-
if (*NumDevices == 0 || (NumEntries < ZeDeviceCount && !Devices))
170+
if (*NumDevices == 0 || (!Devices))
171171
*NumDevices = ZeDeviceCount;
172172
else
173173
*NumDevices = N;

0 commit comments

Comments
 (0)