summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-28 15:45:06 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-28 15:45:06 -0400
commit968ba1132d4c9f861ca2690dcdd9119c7b149bf1 (patch)
treea227a14ea4e8eddcbd690212cdadcab2e72230c7 /src
parent5c55da917df2e3bdbd42e405eda3157fd49d44fc (diff)
downloadlibgd-968ba1132d4c9f861ca2690dcdd9119c7b149bf1.tar.gz
gd_strtok: constify delimiter
Diffstat (limited to 'src')
-rw-r--r--src/gdhelpers.c4
-rw-r--r--src/gdhelpers.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gdhelpers.c b/src/gdhelpers.c
index de7a0a3..302dc18 100644
--- a/src/gdhelpers.c
+++ b/src/gdhelpers.c
@@ -15,13 +15,13 @@
#define SEP_TEST (separators[*((unsigned char *) s)])
char *
-gd_strtok_r (char *s, char *sep, char **state)
+gd_strtok_r(char *s, const char *sep, char **state)
{
char separators[256];
char *result = 0;
memset (separators, 0, sizeof (separators));
while (*sep) {
- separators[*((unsigned char *) sep)] = 1;
+ separators[*((const unsigned char *) sep)] = 1;
sep++;
}
if (!s) {
diff --git a/src/gdhelpers.h b/src/gdhelpers.h
index 9c7ef10..687e156 100644
--- a/src/gdhelpers.h
+++ b/src/gdhelpers.h
@@ -14,7 +14,7 @@ extern "C" {
/* TBB: strtok_r is not universal; provide an implementation of it. */
- char * gd_strtok_r (char *s, char *sep, char **state);
+ char *gd_strtok_r(char *s, const char *sep, char **state);
/* These functions wrap memory management. gdFree is
in gd.h, where callers can utilize it to correctly