]> git.ipfire.org Git - fireperf.git/commitdiff
Remove double declaration of ZERO
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Feb 2021 15:03:33 +0000 (15:03 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Feb 2021 15:05:42 +0000 (15:05 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/main.c
src/random.c
src/random.h

index c418143c6bb2b3ea9f986a88574d58e730d8e637..4c836d68eb871688bee87f26083c8bd4510e0866 100644 (file)
@@ -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;
index b039414251c6e3d9063cc65949e8ec0c5d5562f4..93729e841a1781a6d8002bf1e38eec6580d075d0 100644 (file)
@@ -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)
index e82877a579d473d45cc9e74e105f71b92192e3a0..3edad59a699396ea87adf8011e09454e78e6bc22 100644 (file)
@@ -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);