From: Felix Fietkau Date: Tue, 3 Jun 2014 22:08:01 +0000 (+0200) Subject: cache: constify cache_record fields X-Git-Url: http://git.openwrt.org/?p=project%2Fmdnsd.git;a=commitdiff_plain;h=ef875b5d81ba18d26c7e6cba6ed680a7c89b12db cache: constify cache_record fields Signed-off-by: Felix Fietkau --- diff --git a/cache.h b/cache.h index 134a91e..4e8a421 100644 --- a/cache.h +++ b/cache.h @@ -29,14 +29,14 @@ struct cache_entry { }; struct cache_record { - struct avl_node avl; + struct avl_node avl; - char *record; + const char *record; uint16_t type; uint32_t ttl; int port; - char *txt; - uint8_t *rdata; + const char *txt; + const uint8_t *rdata; uint16_t rdlength; time_t time; }; diff --git a/ubus.c b/ubus.c index dd590af..67a4bab 100644 --- a/ubus.c +++ b/ubus.c @@ -47,7 +47,7 @@ static void mdns_add_records(const char *name) { struct cache_record *r, *q = avl_find_element(&records, name, r, avl); - char *txt; + const char *txt; char buffer[MAX_NAME_LEN]; if (!q)