From 4fc89d6e01c62a97932bb44606bb6db8d77375b4 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 23 Feb 2021 15:03:33 +0000 Subject: [PATCH] Remove double declaration of ZERO Signed-off-by: Michael Tremer --- src/main.c | 2 ++ src/random.c | 2 -- src/random.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index c418143..4c836d6 100644 --- a/src/main.c +++ b/src/main.c @@ -438,6 +438,8 @@ int set_socket_buffer_sizes(struct fireperf_config* conf, int fd) { return 0; } +static const char ZERO[SOCKET_SEND_BUFFER_SIZE] = { 0 }; + int handle_connection_send(struct fireperf_config* conf, struct fireperf_stats* stats, int fd) { const char* buffer = ZERO; diff --git a/src/random.c b/src/random.c index b039414..93729e8 100644 --- a/src/random.c +++ b/src/random.c @@ -25,8 +25,6 @@ #include "main.h" #include "random.h" -const char ZERO[SOCKET_SEND_BUFFER_SIZE] = { 0 }; - struct fireperf_random_pool* fireperf_random_pool_create(struct fireperf_config* conf, size_t size) { struct fireperf_random_pool* pool = calloc(1, sizeof(*pool)); if (!pool) diff --git a/src/random.h b/src/random.h index e82877a..3edad59 100644 --- a/src/random.h +++ b/src/random.h @@ -28,8 +28,6 @@ struct fireperf_random_pool { size_t size; }; -const char ZERO[SOCKET_SEND_BUFFER_SIZE]; - struct fireperf_random_pool* fireperf_random_pool_create( struct fireperf_config* conf, size_t size); void fireperf_random_pool_free(struct fireperf_random_pool* pool); -- 2.47.2