Skip to content

Commit ee516a4

Browse files
committed
while changed to for
1 parent d9dba48 commit ee516a4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/provider/provider_level_zero.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,10 +1045,12 @@ umf_result_t umfLevelZeroMemoryProviderResidentDeviceChange(
10451045

10461046
uint32_t existing_peer_index = 0;
10471047
utils_write_lock(&ze_provider->resident_device_rwlock);
1048-
while (existing_peer_index < ze_provider->resident_device_count &&
1049-
ze_provider->resident_device_handles[existing_peer_index] !=
1050-
device) {
1051-
++existing_peer_index;
1048+
for (; existing_peer_index < ze_provider->resident_device_count;
1049+
++existing_peer_index) {
1050+
if (ze_provider->resident_device_handles[existing_peer_index] !=
1051+
device) {
1052+
break;
1053+
}
10521054
}
10531055

10541056
if (ze_provider->resident_device_count == 0 ||

0 commit comments

Comments
 (0)