From 7d6f40656fa05ddc91ed194a455b96320cf94721 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 7 May 2012 03:31:32 +0200 Subject: [PATCH] sh-quote: Improve shell_quote_argv's signature. * lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'. * lib/sh-quote.c (shell_quote_argv): Likewise. --- ChangeLog | 6 ++++++ lib/sh-quote.c | 4 ++-- lib/sh-quote.h | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b9037cd8..c23333f09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-05-06 Bruno Haible + + sh-quote: Improve shell_quote_argv's signature. + * lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'. + * lib/sh-quote.c (shell_quote_argv): Likewise. + 2012-05-06 Paul Eggert stdint: document issues with int_fast8_t etc. diff --git a/lib/sh-quote.c b/lib/sh-quote.c index a35a574c9..4a8582ee1 100644 --- a/lib/sh-quote.c +++ b/lib/sh-quote.c @@ -69,11 +69,11 @@ shell_quote (const char *string) /* Returns a freshly allocated string containing all argument strings, quoted, separated through spaces. */ char * -shell_quote_argv (char **argv) +shell_quote_argv (char * const *argv) { if (*argv != NULL) { - char **argp; + char * const *argp; size_t length; char *command; char *p; diff --git a/lib/sh-quote.h b/lib/sh-quote.h index cefc014ee..a5515d791 100644 --- a/lib/sh-quote.h +++ b/lib/sh-quote.h @@ -33,4 +33,4 @@ extern char * shell_quote (const char *string); /* Returns a freshly allocated string containing all argument strings, quoted, separated through spaces. */ -extern char * shell_quote_argv (char **argv); +extern char * shell_quote_argv (char * const *argv); -- 2.11.0