summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util/util.c6
-rw-r--r--src/util/util.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/util/util.c b/src/util/util.c
index 8c0899b06..60da88528 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -232,11 +232,11 @@ fail:
return NULL;
}
-char **dup_string_list(TALLOC_CTX *memctx, const char **str_list)
+const char **dup_string_list(TALLOC_CTX *memctx, const char **str_list)
{
int i = 0;
int j = 0;
- char **dup_list;
+ const char **dup_list;
if (!str_list) {
return NULL;
@@ -245,7 +245,7 @@ char **dup_string_list(TALLOC_CTX *memctx, const char **str_list)
/* Find the size of the list */
while (str_list[i]) i++;
- dup_list = talloc_array(memctx, char *, i+1);
+ dup_list = talloc_array(memctx, const char *, i+1);
if (!dup_list) {
return NULL;
}
diff --git a/src/util/util.h b/src/util/util.h
index 5df86b4cb..30713f9b5 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -479,7 +479,7 @@ errno_t sss_fd_nonblocking(int fd);
/* Copy a NULL-terminated string list
* Returns NULL on out of memory error or invalid input
*/
-char **dup_string_list(TALLOC_CTX *memctx, const char **str_list);
+const char **dup_string_list(TALLOC_CTX *memctx, const char **str_list);
/* Take two string lists (terminated on a NULL char*)
* and return up to three arrays of strings based on