From db0f7cf6f03760a39f2165347fdc649df9746405 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Fri, 28 Mar 2014 17:20:12 +0200 Subject: [PATCH] core: silence gcc warning about sprintf() use in add_pool() - this time for sure. --- sgminer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgminer.c b/sgminer.c index 8de82703..b9448e15 100644 --- a/sgminer.c +++ b/sgminer.c @@ -531,9 +531,9 @@ struct pool *add_pool(void) quit(1, "Failed to calloc pool in add_pool"); pool->pool_no = pool->prio = total_pools; - /* Default pool name */ + /* Default pool name is "" (empty string) */ char buf[32]; - sprintf(buf, ""); + buf[0] = '\0'; pool->name = strdup(buf); pools = (struct pool **)realloc(pools, sizeof(struct pool *) * (total_pools + 2));