mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-22 05:19:42 +00:00
util: Don't reference errno when pthread fails.
Pthread library does not set errno. Pthread library's errno is returned by return value. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Github-Pull: #19194 Rebased-From: cb38b069b0f41b1a26264784b1c1303c8ac6ab08
This commit is contained in:
parent
8bd2ab1f35
commit
27bb2cc3b6
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user