aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-06-13 13:03:38 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-06-13 13:03:38 -0400
commit9c25d5e2f13239fc5bd5a6d73778b01f799fe70a (patch)
tree31a3a749bd6fc228baf67513f9d93054e0263a5a
parenteb04d1bf3e50bf6121e48f0e08aac0d95fd34c81 (diff)
downloadstasis-9c25d5e2f13239fc5bd5a6d73778b01f799fe70a.tar.gz
Value argument can be constant
-rw-r--r--include/ini.h2
-rw-r--r--src/ini.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/ini.h b/include/ini.h
index fa2bd98..022a066 100644
--- a/include/ini.h
+++ b/include/ini.h
@@ -98,7 +98,7 @@ struct INIFILE *ini_open(const char *filename);
* @param value
* @return
*/
-struct INISection *ini_section_search(struct INIFILE **ini, unsigned mode, char *value);
+struct INISection *ini_section_search(struct INIFILE **ini, unsigned mode, const char *value);
/**
*
diff --git a/src/ini.c b/src/ini.c
index 2d2eb57..decd29f 100644
--- a/src/ini.c
+++ b/src/ini.c
@@ -16,7 +16,7 @@ void ini_section_init(struct INIFILE **ini) {
(*ini)->section = calloc((*ini)->section_count + 1, sizeof(**(*ini)->section));
}
-struct INISection *ini_section_search(struct INIFILE **ini, unsigned mode, char *value) {
+struct INISection *ini_section_search(struct INIFILE **ini, unsigned mode, const char *value) {
struct INISection *result = NULL;
for (size_t i = 0; i < (*ini)->section_count; i++) {
if ((*ini)->section[i]->key != NULL) {