diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2004-06-30 13:55:08 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2004-06-30 13:55:08 +0000 |
| commit | b7114d4a9cc6a801adfec73c679493547b1d06e6 (patch) | |
| tree | 3ff6af94bbf0e19e7bc33daa334cc38007cf2a9d /lib/libc | |
| parent | 888fa8dfec5ec126fcb5c758f5a15d66e234ee5f (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/gen/wordexp.3 | 4 | ||||
| -rw-r--r-- | lib/libc/gen/wordexp.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/wordexp.3 b/lib/libc/gen/wordexp.3 index 7138bdcb1a825..844059d776fd3 100644 --- a/lib/libc/gen/wordexp.3 +++ b/lib/libc/gen/wordexp.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 27, 2002 +.Dd June 30, 2004 .Dt WORDEXP 3 .Os .Sh NAME @@ -58,7 +58,7 @@ argument is the bitwise inclusive OR of any of the following constants: .It Dv WRDE_APPEND Append the words to those generated by a previous call to .Fn wordexp . -.It Dv WRDE_DOOFS +.It Dv WRDE_DOOFFS As many .Dv NULL pointers as are specified by the diff --git a/lib/libc/gen/wordexp.c b/lib/libc/gen/wordexp.c index 46ccb2f7a1b55..a437543bca403 100644 --- a/lib/libc/gen/wordexp.c +++ b/lib/libc/gen/wordexp.c @@ -155,12 +155,12 @@ we_askshell(const char *words, wordexp_t *we, int flags) */ sofs = we->we_nbytes; vofs = we->we_wordc; - if ((flags & (WRDE_DOOFS|WRDE_APPEND)) == (WRDE_DOOFS|WRDE_APPEND)) + if ((flags & (WRDE_DOOFFS|WRDE_APPEND)) == (WRDE_DOOFFS|WRDE_APPEND)) vofs += we->we_offs; we->we_wordc += nwords; we->we_nbytes += nbytes; if ((nwv = realloc(we->we_wordv, (we->we_wordc + 1 + - (flags & WRDE_DOOFS ? we->we_offs : 0)) * + (flags & WRDE_DOOFFS ? we->we_offs : 0)) * sizeof(char *))) == NULL) { _close(pdes[0]); _waitpid(pid, &status, 0); @@ -194,7 +194,7 @@ we_askshell(const char *words, wordexp_t *we, int flags) * Break the null-terminated expanded word strings out into * the vector. */ - if (vofs == 0 && flags & WRDE_DOOFS) + if (vofs == 0 && flags & WRDE_DOOFFS) while (vofs < we->we_offs) we->we_wordv[vofs++] = NULL; p = we->we_strings + sofs; |
