mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Added a few more const where possible
This commit is contained in:
parent
970ce28c12
commit
ef1322df67
@ -47,7 +47,7 @@
|
|||||||
*
|
*
|
||||||
* an allocated dedotdotified output string
|
* an allocated dedotdotified output string
|
||||||
*/
|
*/
|
||||||
char *Curl_dedotdotify(char *input)
|
char *Curl_dedotdotify(const char *input)
|
||||||
{
|
{
|
||||||
size_t inlen = strlen(input);
|
size_t inlen = strlen(input);
|
||||||
char *clone;
|
char *clone;
|
||||||
|
@ -21,5 +21,5 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
char *Curl_dedotdotify(char *input);
|
char *Curl_dedotdotify(const char *input);
|
||||||
#endif
|
#endif
|
||||||
|
@ -101,7 +101,7 @@ struct Curl_tree *Curl_splayinsert(struct timeval i,
|
|||||||
struct Curl_tree *t,
|
struct Curl_tree *t,
|
||||||
struct Curl_tree *node)
|
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)
|
if(node == NULL)
|
||||||
return t;
|
return t;
|
||||||
@ -223,7 +223,7 @@ int Curl_splayremovebyaddr(struct Curl_tree *t,
|
|||||||
struct Curl_tree *removenode,
|
struct Curl_tree *removenode,
|
||||||
struct Curl_tree **newroot)
|
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;
|
struct Curl_tree *x;
|
||||||
|
|
||||||
if(!t || !removenode)
|
if(!t || !removenode)
|
||||||
|
@ -44,7 +44,7 @@ UNITTEST_START
|
|||||||
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int fails=0;
|
int fails=0;
|
||||||
struct dotdot pairs[] = {
|
const struct dotdot pairs[] = {
|
||||||
{ "/a/b/c/./../../g", "/a/g" },
|
{ "/a/b/c/./../../g", "/a/g" },
|
||||||
{ "mid/content=5/../6", "mid/6" },
|
{ "mid/content=5/../6", "mid/6" },
|
||||||
{ "/hello/../moo", "/moo" },
|
{ "/hello/../moo", "/moo" },
|
||||||
|
Loading…
Reference in New Issue
Block a user