diff --git a/lib/dotdot.c b/lib/dotdot.c index 41b73bef412247b7fd185de30ce5d95ed41b9687..0cb3c9667b0f230c4c2c806b278bdece99addfb3 100644 --- a/lib/dotdot.c +++ b/lib/dotdot.c @@ -47,7 +47,7 @@ * * an allocated dedotdotified output string */ -char *Curl_dedotdotify(char *input) +char *Curl_dedotdotify(const char *input) { size_t inlen = strlen(input); char *clone; diff --git a/lib/dotdot.h b/lib/dotdot.h index c3487c137b13d6c362809ed986e93bb382171798..f511396d71de08431da3c93058449c43d4412513 100644 --- a/lib/dotdot.h +++ b/lib/dotdot.h @@ -21,5 +21,5 @@ * KIND, either express or implied. * ***************************************************************************/ -char *Curl_dedotdotify(char *input); +char *Curl_dedotdotify(const char *input); #endif diff --git a/lib/splay.c b/lib/splay.c index 3570712d4359ce2ac84498b252669ee7fed4f61b..129d24476baff0e96ed7a190e47a794040df0e2d 100644 --- a/lib/splay.c +++ b/lib/splay.c @@ -101,7 +101,7 @@ struct Curl_tree *Curl_splayinsert(struct timeval i, struct Curl_tree *t, struct Curl_tree *node) { - static struct timeval KEY_NOTUSED = {-1,-1}; /* will *NEVER* appear */ + static const struct timeval KEY_NOTUSED = {-1,-1}; /* will *NEVER* appear */ if(node == NULL) return t; @@ -223,7 +223,7 @@ int Curl_splayremovebyaddr(struct Curl_tree *t, struct Curl_tree *removenode, struct Curl_tree **newroot) { - static struct timeval KEY_NOTUSED = {-1,-1}; /* will *NEVER* appear */ + static const struct timeval KEY_NOTUSED = {-1,-1}; /* will *NEVER* appear */ struct Curl_tree *x; if(!t || !removenode) diff --git a/tests/unit/unit1395.c b/tests/unit/unit1395.c index 0fdf147d9f7bf08945ed3783cdeed87d8e5b70ed..b27ba06b696d732e9d8a27fe9756f3442df642ae 100644 --- a/tests/unit/unit1395.c +++ b/tests/unit/unit1395.c @@ -44,7 +44,7 @@ UNITTEST_START unsigned int i; int fails=0; - struct dotdot pairs[] = { + const struct dotdot pairs[] = { { "/a/b/c/./../../g", "/a/g" }, { "mid/content=5/../6", "mid/6" }, { "/hello/../moo", "/moo" },