From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B0CCA138CD3 for ; Fri, 29 May 2015 11:32:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7F05BE0875; Fri, 29 May 2015 11:32:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C60D4E0875 for ; Fri, 29 May 2015 11:32:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C2295340DDF for ; Fri, 29 May 2015 11:32:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8A0879EE for ; Fri, 29 May 2015 11:32:02 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1432899106.d4b136d91ba101673e79836229f3155f502eb056.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:master commit in: misc/install-xattr/ X-VCS-Repository: proj/elfix X-VCS-Files: misc/install-xattr/install-xattr.c X-VCS-Directories: misc/install-xattr/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: d4b136d91ba101673e79836229f3155f502eb056 X-VCS-Branch: master Date: Fri, 29 May 2015 11:32:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a8adc574-96bd-499f-bd82-94859bfe4911 X-Archives-Hash: f3d68597b25772bf8d3d02ccc47be74a commit: d4b136d91ba101673e79836229f3155f502eb056 Author: Jason Zaman perfinion com> AuthorDate: Thu May 28 14:31:00 2015 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Fri May 29 11:31:46 2015 +0000 URL: https://gitweb.gentoo.org/proj/elfix.git/commit/?id=d4b136d9 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 gentoo.org> misc/install-xattr/install-xattr.c | 8 ++++++-- 1 file 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 */