If the wait ever returned -ETIME, we'd abort because the errno was
stored in errno and not drmIoctl()'s return value.
ret = 0;
}
- if (ret == -ETIME) {
- return false;
- } else if (ret != 0) {
- fprintf(stderr, "wait failed\n");
- abort();
- } else {
+ if (ret == 0) {
screen->finished_seqno = wait.seqno;
return true;
}
+
+ if (errno != ETIME) {
+ fprintf(stderr, "wait failed: %d\n", ret);
+ abort();
+ }
+
+ return false;
}
bool
else
ret = 0;
- if (ret == -ETIME) {
- return false;
- } else if (ret != 0) {
- fprintf(stderr, "wait failed\n");
- abort();
- } else {
+ if (ret == 0)
return true;
+
+ if (errno != ETIME) {
+ fprintf(stderr, "wait failed: %d\n", ret);
+ abort();
}
+
+ return false;
}
void *