diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-11-18 20:25:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-11-18 20:25:07 +0000 |
commit | 1daa81649b2faaf989e5848392a488c786db0820 (patch) | |
tree | 9ba1cf459014ddc1b6f524fa5ef79ceb8bdca4b2 /manual/pattern.texi | |
parent | a185f478f053d6e6a2322ce725b9eca70e929c4b (diff) | |
download | glibc-1daa81649b2faaf989e5848392a488c786db0820.tar glibc-1daa81649b2faaf989e5848392a488c786db0820.tar.gz glibc-1daa81649b2faaf989e5848392a488c786db0820.tar.bz2 glibc-1daa81649b2faaf989e5848392a488c786db0820.zip |
(Wordexp Example): Fix three bugs in the example code, all related to the options parameter.
Diffstat (limited to 'manual/pattern.texi')
-rw-r--r-- | manual/pattern.texi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/manual/pattern.texi b/manual/pattern.texi index 0718ae5cfc..d4f287dcf2 100644 --- a/manual/pattern.texi +++ b/manual/pattern.texi @@ -1353,7 +1353,7 @@ to free the space allocated by @code{wordexp}. @smallexample int -expand_and_execute (const char *program, const char *options) +expand_and_execute (const char *program, const char **options) @{ wordexp_t result; pid_t pid @@ -1373,9 +1373,9 @@ expand_and_execute (const char *program, const char *options) @} /* @r{Expand the strings specified for the arguments.} */ - for (i = 0; args[i]; i++) + for (i = 0; options[i] != NULL; i++) @{ - if (wordexp (options, &result, WRDE_APPEND)) + if (wordexp (options[i], &result, WRDE_APPEND)) @{ wordfree (&result); return -1; |