aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/system.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 5a3c68aa0c..db1d032916 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -1236,9 +1236,10 @@ int ScheduleBatchPriority()
{
#ifdef SCHED_BATCH
const static sched_param param{};
- if (int ret = pthread_setschedparam(pthread_self(), SCHED_BATCH, &param)) {
- LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno));
- return ret;
+ const int rc = pthread_setschedparam(pthread_self(), SCHED_BATCH, &param);
+ if (rc != 0) {
+ LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(rc));
+ return rc;
}
return 0;
#else