diff options
author | Jason Zaman <jason@perfinion.com> | 2015-05-28 18:31:00 +0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-09-03 19:11:07 -0400 |
commit | 0ea4fa5a3008aa6d90b74a3bf2d1aaff4e2f0598 (patch) | |
tree | d967ef092bfb34060b55bd29cd28c2953694edb5 | |
parent | scripts/paxmodule.c: fix build with clang (diff) | |
download | elfix-0ea4fa5a3008aa6d90b74a3bf2d1aaff4e2f0598.tar.gz elfix-0ea4fa5a3008aa6d90b74a3bf2d1aaff4e2f0598.tar.bz2 elfix-0ea4fa5a3008aa6d90b74a3bf2d1aaff4e2f0598.zip |
misc/install-xattr: ignore all whitespace in PORTAGE_XATTR_EXCLUDE
if the PORTAGE_XATTR_EXCLUDE variable contains whitespace other
than just ' ', the matching fails to exclude what comes after it.
This replaces all whitespace instead of only just space.
Signed-off-by: Jason Zaman <perfinion@gentoo.org>
-rw-r--r-- | misc/install-xattr/install-xattr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/misc/install-xattr/install-xattr.c b/misc/install-xattr/install-xattr.c index b650c67..0b5eb25 100644 --- a/misc/install-xattr/install-xattr.c +++ b/misc/install-xattr/install-xattr.c @@ -261,8 +261,12 @@ main(int argc, char* argv[]) * strings. Also, no need to free(exclude) before we exit(). */ char *p = exclude; - while ((p = strchr(p, ' '))) - *p++ = '\0'; + char *pend = p + len_exclude; + while (p != pend) { + if (isspace(*p)) + *p = '\0'; + p++; + } opterr = 0; /* we skip many legitimate flags, so silence any warning */ |