MXS-1441 Make externcmd_allocate const correct

This commit is contained in:
Johan Wikman 2017-10-03 10:45:37 +03:00
parent cf0a87e7f2
commit 17c3d1e612
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@
*
* @return 0 on success, -1 on error
*/
static int tokenize_arguments(char* argstr, char** argv)
static int tokenize_arguments(const char* argstr, char** argv)
{
int i = 0;
bool quoted = false;
@ -104,7 +104,7 @@ static int tokenize_arguments(char* argstr, char** argv)
return 0;
}
EXTERNCMD* externcmd_allocate(char* argstr, uint32_t timeout)
EXTERNCMD* externcmd_allocate(const char* argstr, uint32_t timeout)
{
EXTERNCMD* cmd = (EXTERNCMD*) MXS_MALLOC(sizeof(EXTERNCMD));
char** argv = (char**) MXS_MALLOC(sizeof(char*) * MAXSCALE_EXTCMD_ARG_MAX);

View File

@ -42,7 +42,7 @@ char* externcmd_extract_command(const char* argstr);
*
* @return Pointer to new external command struct or NULL if an error occurred
*/
EXTERNCMD* externcmd_allocate(char* argstr, uint32_t timeout);
EXTERNCMD* externcmd_allocate(const char* argstr, uint32_t timeout);
/**