diff --git a/src/util/conv.c b/src/util/conv.c index 5f1563b54..e4e7a08b4 100644 --- a/src/util/conv.c +++ b/src/util/conv.c @@ -356,7 +356,7 @@ add_quoted_to_string(struct string *string, const char *src, int len) } struct string * -add_shell_quoted_to_string(struct string *string, char *src, int len) +add_shell_quoted_to_string(struct string *string, const char *src, int len) { add_char_to_string(string, '\''); for (; len; len--, ++src) @@ -370,7 +370,7 @@ add_shell_quoted_to_string(struct string *string, char *src, int len) } struct string * -add_shell_safe_to_string(struct string *string, char *cmd, int cmdlen) +add_shell_safe_to_string(struct string *string, const char *cmd, int cmdlen) { int prev_safe = 0; diff --git a/src/util/conv.h b/src/util/conv.h index a953df741..dd7555714 100644 --- a/src/util/conv.h +++ b/src/util/conv.h @@ -112,11 +112,11 @@ struct string *add_quoted_to_string(struct string *string, const char *q, int ql * and ' to @a string. * @relates string */ struct string *add_shell_quoted_to_string(struct string *string, - char *src, int len); + const char *src, int len); /* Escapes non shell safe chars with '_'. * @relates string */ -struct string *add_shell_safe_to_string(struct string *string, char *cmd, int cmdlen); +struct string *add_shell_safe_to_string(struct string *string, const char *cmd, int cmdlen); /** @} */