return;
}
- if (state->num_locks != num_locks) {
- fprintf(stderr, "%s: state->num_locks=%zu != num_locks=%zu\n",
- state->location, state->num_locks, num_locks);
- return;
- }
-
- if (state->num_locks == 0) {
- state->ok = true;
- return;
- }
-
for (i = 0; i < num_locks; i++) {
if (locks[i].lock_type != state->lock_type) {
fprintf(stderr, "%s:[%zu] found type %d, expected %d\n",
return;
}
+ if (state->num_locks != num_locks) {
+ fprintf(stderr, "%s: state->num_locks=%zu != num_locks=%zu\n",
+ state->location, state->num_locks, num_locks);
+ return;
+ }
+
state->ok = true;
}