From ef875b5d81ba18d26c7e6cba6ed680a7c89b12db Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 4 Jun 2014 00:08:01 +0200 Subject: [PATCH 1/1] cache: constify cache_record fields Signed-off-by: Felix Fietkau --- cache.h | 8 ++++---- ubus.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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) -- 2.11.0