1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 04:24:19 +00:00

pool: do not use defines, just inline strings.

This commit is contained in:
Noel Maersk 2014-02-28 23:30:49 +02:00
parent d58de45c0e
commit 4059780d01
2 changed files with 5 additions and 5 deletions

7
pool.c
View File

@ -36,12 +36,15 @@
#include <string.h> #include <string.h>
char* get_pool_name(struct pool *pool) { char* get_pool_name(struct pool *pool) {
if (opt_incognito) return POOL_NAME_INCOGNITO; if (opt_incognito) return "<pool>";
if (strcmp(pool->poolname, "") == 0) return pool->sockaddr_url; if (strcmp(pool->poolname, "") == 0) return pool->sockaddr_url;
return pool->poolname; return pool->poolname;
} }
char* get_pool_user(struct pool *pool) { char* get_pool_user(struct pool *pool) {
if (opt_incognito) return POOL_USER_INCOGNITO; if (opt_incognito) return "<user>";
return pool->rpc_user; return pool->rpc_user;
} }

3
pool.h
View File

@ -3,9 +3,6 @@
#include "miner.h" #include "miner.h"
#define POOL_NAME_INCOGNITO "<incognito>"
#define POOL_USER_INCOGNITO "<incognito>"
extern char* get_pool_name(struct pool *pool); extern char* get_pool_name(struct pool *pool);
extern char* get_pool_user(struct pool *pool); extern char* get_pool_user(struct pool *pool);