mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-04 18:21:54 +00:00
Get rid of unused result warning with asprintf.
This commit is contained in:
parent
896775e308
commit
8f954d40ec
3
util.c
3
util.c
@ -326,8 +326,7 @@ json_t *json_rpc_call(CURL *curl, const char *url,
|
|||||||
headers = curl_slist_append(headers,
|
headers = curl_slist_append(headers,
|
||||||
"X-Mining-Extensions: longpoll midstate rollntime submitold");
|
"X-Mining-Extensions: longpoll midstate rollntime submitold");
|
||||||
|
|
||||||
if (likely(global_hashrate)) {
|
if (likely(global_hashrate && asprintf(&ghashrate, "X-Mining-Hashrate: %llu", global_hashrate) != -1)) {
|
||||||
asprintf(&ghashrate, "X-Mining-Hashrate: %llu", global_hashrate);
|
|
||||||
headers = curl_slist_append(headers, ghashrate);
|
headers = curl_slist_append(headers, ghashrate);
|
||||||
free(ghashrate);
|
free(ghashrate);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user