Skip to content

Commit 1a561fc

Browse files
committed
stress-shm: add UNLIKELY hint on loop break
Signed-off-by: Colin Ian King <[email protected]>
1 parent a358880 commit 1a561fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stress-shm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ static int stress_shm(stress_args_t *args)
458458
pr_fail("%s: zero bytes read\n", args->name);
459459
break;
460460
}
461-
if ((msg.index < 0) ||
462-
(msg.index >= (ssize_t)shm_posix_objects)) {
461+
if (UNLIKELY((msg.index < 0) ||
462+
(msg.index >= (ssize_t)shm_posix_objects))) {
463463
retry = false;
464464
break;
465465
}

0 commit comments

Comments
 (0)