reuse mdns_buf for cache_answer()
authorFelix Fietkau <nbd@openwrt.org>
Mon, 9 Jun 2014 22:07:49 +0000 (00:07 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 9 Jun 2014 22:07:49 +0000 (00:07 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
cache.c

diff --git a/cache.c b/cache.c
index 89bd015bb80d1748299453ac1a5e6d904906acb7..dbd258d2f073a3e79802815b9b6e6969e767bf8e 100644 (file)
--- a/cache.c
+++ b/cache.c
@@ -226,8 +226,7 @@ cache_answer(struct interface *iface, uint8_t *base, int blen, char *name, struc
        char *name_buf;
        void *rdata_ptr, *txt_ptr;
        int host_len = 0;
-
-       static char rdata_buffer[MAX_DATA_LEN + 1];
+       static char *rdata_buffer = (char *) mdns_buf;
 
        if (!(a->class & CLASS_IN))
                return;