From 42ec2640753650c69385d86c2fbb386d23965c89 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 20 Jun 2021 14:17:31 +0200 Subject: tokenize: strdup() each individual argv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of referencing the un-tokenized “raw” command string, strdup() each argv. This way, the input string can be ‘const’. --- tokenize.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tokenize.h') diff --git a/tokenize.h b/tokenize.h index f9579255..9e5de6c9 100644 --- a/tokenize.h +++ b/tokenize.h @@ -2,4 +2,4 @@ #include -bool tokenize_cmdline(char *cmdline, char ***argv); +bool tokenize_cmdline(const char *cmdline, char ***argv); -- cgit v1.3