diff options
-rw-r--r-- | src/util/system.cpp | 7 |
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, ¶m)) { - LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno)); - return ret; + const int rc = pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m); + if (rc != 0) { + LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(rc)); + return rc; } return 0; #else |