The string we add should be const for strlist.

This commit is contained in:
Andreas Schneider 2008-03-25 16:07:58 +01:00
parent d2c3e0734f
commit 10ec516dce
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ c_strlist_t *c_strlist_expand(c_strlist_t *strlist, size_t size) {
return strlist;
}
int c_strlist_add(c_strlist_t *strlist, char *string) {
int c_strlist_add(c_strlist_t *strlist, const char *string) {
if (strlist == NULL || string == NULL) {
return -1;
}

View File

@ -94,7 +94,7 @@ c_strlist_t *c_strlist_expand(c_strlist_t *strlist, size_t size);
*
* @return 0 on success, less than 0 if an error occured.
*/
int c_strlist_add(c_strlist_t *strlist, char *string);
int c_strlist_add(c_strlist_t *strlist, const char *string);
/**
* @brief Destroy the memory of the stringlist.