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 89bd015..dbd258d 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;
        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;
 
        if (!(a->class & CLASS_IN))
                return;