From bbe3ec2fa8de29a0a7d36360244c59303a0cd3f7 Mon Sep 17 00:00:00 2001 From: Kagami Hiiragi Date: Sat, 31 Jan 2015 00:28:42 +0300 Subject: [PATCH] Do not use designated initializers --- src/pow.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pow.cc b/src/pow.cc index aba625b..b23958a 100644 --- a/src/pow.cc +++ b/src/pow.cc @@ -111,13 +111,13 @@ int pow(size_t pool_size, pthread_mutex_t mutex; pthread_mutex_init(&mutex, NULL); PowArgs pow_args = { - .pool_size = pool_size, - .target = target, - .initial_hash = initial_hash, - .max_nonce = max_nonce ? max_nonce : INT64_MAX, - .result = RESULT_NOT_READY, - .nonce = 0, - .mutex = &mutex, + pool_size, + target, + initial_hash, + max_nonce ? max_nonce : INT64_MAX, + RESULT_NOT_READY, + 0, + &mutex, }; ThreadArgs threads_args[pool_size]; pthread_t threads[pool_size]; @@ -126,7 +126,7 @@ int pow(size_t pool_size, // Spawn threads. for (i = 0; i < pool_size; i++) { - ThreadArgs args = {.num = i, .pow_args = &pow_args}; + ThreadArgs args = {i, &pow_args}; threads_args[i] = args; error = pthread_create(&threads[i], NULL, pow_thread, &threads_args[i]); if (error) {