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 A8D871381F3 for ; Mon, 26 Nov 2012 10:10:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 85BC921C0B3; Mon, 26 Nov 2012 10:10:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E9C3B21C0B3 for ; Mon, 26 Nov 2012 10:10:21 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E73D233D99C for ; Mon, 26 Nov 2012 10:10:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 538DFE5444 for ; Mon, 26 Nov 2012 10:10:18 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1353652384.38241c15b80790efb11b1c128a3277900a89191b.vapier@gentoo> Subject: [gentoo-commits] proj/sandbox:master commit in: libsbutil/ X-VCS-Repository: proj/sandbox X-VCS-Files: libsbutil/sb_efuncs.c X-VCS-Directories: libsbutil/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 38241c15b80790efb11b1c128a3277900a89191b X-VCS-Branch: master Date: Mon, 26 Nov 2012 10:10:18 +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: 8596d5eb-fb9e-425c-99d2-051982bc5f06 X-Archives-Hash: 43b1a86013ec4d9b550244f572b9a655 commit: 38241c15b80790efb11b1c128a3277900a89191b Author: Mike Frysinger gentoo org> AuthorDate: Fri Nov 23 06:27:17 2012 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Fri Nov 23 06:33:04 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commit;h=38241c15 sb_efuncs: fix NOCOLOR handling Need to set the colors to "" rather than NULL so we don't print out "(null)" where the colors normally would be. Signed-off-by: Mike Frysinger gentoo.org> --- libsbutil/sb_efuncs.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libsbutil/sb_efuncs.c b/libsbutil/sb_efuncs.c index 248c2bd..5a86d25 100644 --- a/libsbutil/sb_efuncs.c +++ b/libsbutil/sb_efuncs.c @@ -44,8 +44,11 @@ const char *colors[] = { __attribute__((constructor)) static void sbio_init(void) { - if (is_env_on(ENV_NOCOLOR)) - memset(colors, 0, sizeof(colors)); + if (is_env_on(ENV_NOCOLOR)) { + size_t i; + for (i = 0; i < ARRAY_SIZE(colors); ++i) + colors[i] = ""; + } } static bool try_portage_helpers = false;