+2018-01-10 Daniel van Gerpen <daniel@vangerpen.de>
+
+ * argv.c (expandargv): Correct check for dynamically
+ allocated argv.
+
2018-01-03 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
{
/* The argument we are currently processing. */
int i = 0;
- /* Non-zero if ***argvp has been dynamically allocated. */
- int argv_dynamic = 0;
+ /* To check if ***argvp has been dynamically allocated. */
+ char ** const original_argv = *argvp;
/* Limit the number of response files that we parse in order
to prevent infinite recursion. */
unsigned int iteration_limit = 2000;
/* Parse the string. */
file_argv = buildargv (buffer);
/* If *ARGVP is not already dynamically allocated, copy it. */
- if (!argv_dynamic)
+ if (*argvp == original_argv)
*argvp = dupargv (*argvp);
/* Count the number of arguments. */
file_argc = 0;