]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
treewide: fix -Wold-style-*
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 7 Jun 2023 08:54:30 +0000 (10:54 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 8 Jun 2023 06:13:06 +0000 (08:13 +0200)
daemon/io.c
daemon/udp_queue.c
utils/cache_gc/main.c

index 48bfed301554a1ddc2e93f11c09df315447ad7b5..27119adbf0384c62207d9437f521180ee16809cc 100644 (file)
@@ -893,7 +893,7 @@ void io_tty_alloc(uv_handle_t *handle, size_t suggested, uv_buf_t *buf)
        buf->base = malloc(suggested);
 }
 
-struct io_stream_data *io_tty_alloc_data() {
+struct io_stream_data *io_tty_alloc_data(void) {
        knot_mm_t *pool = mm_ctx_mempool2(MM_DEFAULT_BLKSIZE);
        if (!pool) {
                return NULL;
index b8b7a50adcd33b405fcfa631199a4e9b15275466..1f8ff39ecbbc2d9f6ced3825225bbfed0024656f 100644 (file)
@@ -57,7 +57,7 @@ static udp_queue_t * udp_queue_create(void)
 }
 
 /** Global state for udp_queue_*.  Note: we never free the pointed-to memory. */
-struct {
+struct state {
        /** Singleton map: fd -> udp_queue_t, as a simple array of pointers. */
        udp_queue_t **udp_queues;
        int udp_queues_len;
@@ -66,7 +66,8 @@ struct {
        array_t(int) waiting_fds;
 
        uv_check_t check_handle;
-} static state = {0};
+};
+static struct state state = {0};
 
 /** Empty the given queue.  The queue is assumed to exist (but may be empty). */
 static void udp_queue_send(int fd)
index db4f0bd8c1617f518b09ee86d0daf22a4159ef73..5adf19f06ef9fd1a196f73a1d67921b3802e5b5b 100644 (file)
@@ -12,7 +12,7 @@
 #include "kresconfig.h"
 #include "kr_cache_gc.h"
 
-volatile static int killed = 0;
+static volatile int killed = 0;
 
 static void got_killed(int signum)
 {