diff --git a/modules/src/data/stringlist.c b/modules/src/data/stringlist.c index 39f125697..e947ea58f 100644 --- a/modules/src/data/stringlist.c +++ b/modules/src/data/stringlist.c @@ -39,7 +39,7 @@ void stringlist_free(struct stringlist* list, int freedata) struct stringfragment* next = f->next; if (freedata) { - free(f->data); + free((void*) f->data); f->data = NULL; } free(f); @@ -54,7 +54,7 @@ void stringlist_init(struct stringlist* list) } -char* stringlist_get(struct stringlist *list, int index) +const char* stringlist_get(struct stringlist *list, int index) { struct stringfragment* f = list->first; int i = 0; diff --git a/modules/src/data/stringlist.h b/modules/src/data/stringlist.h index b3c6ae8e6..b104314d8 100644 --- a/modules/src/data/stringlist.h +++ b/modules/src/data/stringlist.h @@ -3,7 +3,7 @@ struct stringfragment { - char* data; + const char* data; struct stringfragment* next; }; @@ -18,7 +18,7 @@ extern void stringlist_addall(struct stringlist* list, struct stringlist* src); extern void stringlist_free(struct stringlist* list, int freedata); extern void stringlist_init(struct stringlist* list); extern int stringlist_count(struct stringlist *list); -extern char* stringlist_get(struct stringlist *list, int index); +extern const char* stringlist_get(struct stringlist *list, int index); #endif