mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-13 11:25:02 -05:00
util: Remove designator initializer from ScheduleBatchPriority
Although no compiler appears to complain about it, these are not valid for c++11. (http://en.cppreference.com/w/cpp/language/aggregate_initialization says they're c++20) The structure is defined as: struct sched_param { int sched_priority; }; So passing 0 for the first field has the same effect.
This commit is contained in:
parent
cff66e6a29
commit
b86730a4d7
1 changed files with 1 additions and 1 deletions
|
@ -1064,7 +1064,7 @@ fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
|
||||||
int ScheduleBatchPriority(void)
|
int ScheduleBatchPriority(void)
|
||||||
{
|
{
|
||||||
#ifdef SCHED_BATCH
|
#ifdef SCHED_BATCH
|
||||||
const static sched_param param{.sched_priority = 0};
|
const static sched_param param{0};
|
||||||
if (int ret = pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m)) {
|
if (int ret = pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m)) {
|
||||||
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno));
|
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno));
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue