From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D313B138334 for ; Sun, 14 Apr 2019 18:40:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A3684E08D0; Sun, 14 Apr 2019 18:40:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7E74CE08D0 for ; Sun, 14 Apr 2019 18:40:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 19CF9341107 for ; Sun, 14 Apr 2019 18:40:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 81FFB326 for ; Sun, 14 Apr 2019 18:40:08 +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: <1555267201.920955039276dba6059cd281b1f0c17c8218c60e.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: 920955039276dba6059cd281b1f0c17c8218c60e X-VCS-Branch: master Date: Sun, 14 Apr 2019 18:40:08 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 200c5b54-c15c-4bd9-80a9-39087a4f4013 X-Archives-Hash: 5f4b5f6a65eeb7642097ed32b55da3bb commit: 920955039276dba6059cd281b1f0c17c8218c60e Author: Anthony G. Basile gentoo org> AuthorDate: Sun Apr 14 18:39:44 2019 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sun Apr 14 18:40:01 2019 +0000 URL: https://gitweb.gentoo.org/proj/elfix.git/commit/?id=92095503 install-xattr: address compiler warnings, bug #682110 Signed-off-by: Anthony G. Basile gentoo.org> misc/install-xattr/install-xattr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/install-xattr/install-xattr.c b/misc/install-xattr/install-xattr.c index 3e20b63..5c8a978 100644 --- a/misc/install-xattr/install-xattr.c +++ b/misc/install-xattr/install-xattr.c @@ -239,7 +239,7 @@ main(int argc, char* argv[]) int target_is_directory = 0; /* is the target a directory? */ int first, last; /* argv indices of the first file/directory and last */ - char *target; /* the target file or directory */ + char *target = NULL; /* the target file or directory */ char *path; /* path to the target file */ char *mypath = realpath("/proc/self/exe", NULL); /* path to argv[0] */ @@ -331,7 +331,8 @@ main(int argc, char* argv[]) char *portage_helper_path = getenv("__PORTAGE_HELPER_PATH"); char *portage_helper_canpath = NULL; if (portage_helper_path) - chdir(oldpwd); + if (chdir(oldpwd) != 0) + err(1, "failed to chdir %s", oldpwd); switch (fork()) { case -1: