From: Ruben Kerkhof Date: Fri, 4 Mar 2016 13:40:06 +0000 (+0100) Subject: powerdns: constify some stuff X-Git-Tag: collectd-5.6.0~444^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ee50bc201f0fe46151c966217703896f520cac2b;p=collectd.git powerdns: constify some stuff make some variables static while we're at it --- diff --git a/src/powerdns.c b/src/powerdns.c index 0400f3d9..ab62dcfd 100644 --- a/src/powerdns.c +++ b/src/powerdns.c @@ -75,9 +75,9 @@ struct list_item_s struct statname_lookup_s { - char *name; - char *type; - char *type_instance; + const char *name; + const char *type; + const char *type_instance; }; typedef struct statname_lookup_s statname_lookup_t; @@ -143,7 +143,7 @@ uptime number of seconds process has been running (since 3.1.5) user-msec number of CPU milliseconds spent in 'user' mode }}} */ -const char* const default_server_fields[] = /* {{{ */ +static const char* const default_server_fields[] = /* {{{ */ { "latency", "packetcache-hit", @@ -158,9 +158,9 @@ const char* const default_server_fields[] = /* {{{ */ "udp-answers", "udp-queries", }; /* }}} */ -int default_server_fields_num = STATIC_ARRAY_SIZE (default_server_fields); +static int default_server_fields_num = STATIC_ARRAY_SIZE (default_server_fields); -statname_lookup_t lookup_table[] = /* {{{ */ +static statname_lookup_t lookup_table[] = /* {{{ */ { /********************* * Server statistics * @@ -285,7 +285,7 @@ statname_lookup_t lookup_table[] = /* {{{ */ {"unexpected-packets", "dns_answer", "unexpected"}, {"uptime", "uptime", NULL} }; /* }}} */ -int lookup_table_length = STATIC_ARRAY_SIZE (lookup_table); +static int lookup_table_length = STATIC_ARRAY_SIZE (lookup_table); static llist_t *list = NULL;