From: Alan T. DeKok Date: Tue, 29 May 2012 15:11:20 +0000 (+0200) Subject: More "const" X-Git-Tag: release_3_0_0_beta0~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e6f0014ab55996cbd2ee25f129180a78e3ab030;p=thirdparty%2Ffreeradius-server.git More "const" --- diff --git a/src/include/conffile.h b/src/include/conffile.h index a187a469591..651a9cb6f5b 100644 --- a/src/include/conffile.h +++ b/src/include/conffile.h @@ -81,18 +81,18 @@ VALUE_PAIR *cf_pairtovp(CONF_PAIR *pair); const char *cf_section_name1(const CONF_SECTION *); const char *cf_section_name2(const CONF_SECTION *); int dump_config(const CONF_SECTION *cs); -CONF_SECTION *cf_subsection_find_next(CONF_SECTION *section, +CONF_SECTION *cf_subsection_find_next(const CONF_SECTION *section, const CONF_SECTION *subsection, const char *name1); -CONF_SECTION *cf_section_find_next(CONF_SECTION *section, +CONF_SECTION *cf_section_find_next(const CONF_SECTION *section, const CONF_SECTION *subsection, const char *name1); int cf_section_lineno(const CONF_SECTION *section); int cf_pair_lineno(const CONF_PAIR *pair); const char *cf_pair_filename(const CONF_PAIR *pair); const char *cf_section_filename(const CONF_SECTION *section); -CONF_ITEM *cf_item_find_next(CONF_SECTION *section, CONF_ITEM *item); -CONF_SECTION *cf_item_parent(CONF_ITEM *ci); +CONF_ITEM *cf_item_find_next(const CONF_SECTION *section, const CONF_ITEM *item); +CONF_SECTION *cf_item_parent(const CONF_ITEM *ci); int cf_item_is_section(const CONF_ITEM *item); int cf_item_is_pair(const CONF_ITEM *item); CONF_PAIR *cf_itemtopair(CONF_ITEM *item); diff --git a/src/main/conffile.c b/src/main/conffile.c index c26c83b935f..14a75a73454 100644 --- a/src/main/conffile.c +++ b/src/main/conffile.c @@ -2218,7 +2218,7 @@ CONF_SECTION *cf_section_sub_find_name2(const CONF_SECTION *cs, * name1 is NULL, any name1 matches. */ -CONF_SECTION *cf_subsection_find_next(CONF_SECTION *section, +CONF_SECTION *cf_subsection_find_next(const CONF_SECTION *section, const CONF_SECTION *subsection, const char *name1) { @@ -2255,7 +2255,7 @@ CONF_SECTION *cf_subsection_find_next(CONF_SECTION *section, * name1 is NULL, any name1 matches. */ -CONF_SECTION *cf_section_find_next(CONF_SECTION *section, +CONF_SECTION *cf_section_find_next(const CONF_SECTION *section, const CONF_SECTION *subsection, const char *name1) { @@ -2270,7 +2270,7 @@ CONF_SECTION *cf_section_find_next(CONF_SECTION *section, * Return the next item after a CONF_ITEM. */ -CONF_ITEM *cf_item_find_next(CONF_SECTION *section, CONF_ITEM *item) +CONF_ITEM *cf_item_find_next(const CONF_SECTION *section, const CONF_ITEM *item) { if (!section) return NULL; @@ -2286,7 +2286,7 @@ CONF_ITEM *cf_item_find_next(CONF_SECTION *section, CONF_ITEM *item) } } -CONF_SECTION *cf_item_parent(CONF_ITEM *ci) +CONF_SECTION *cf_item_parent(const CONF_ITEM *ci) { if (!ci) return NULL;