Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/elfix:elfix-0.9.x commit in: misc/install-xattr/
Date: Sun, 14 Apr 2019 19:02:13
Message-Id: 1555268511.530a6008938d6657e6b64f389c902f365c8f19be.blueness@gentoo
1 commit: 530a6008938d6657e6b64f389c902f365c8f19be
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 14 18:39:44 2019 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 14 19:01:51 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/elfix.git/commit/?id=530a6008
7
8 install-xattr: address compiler warnings, bug #682110
9
10 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
11
12 misc/install-xattr/install-xattr.c | 5 +++--
13 1 file changed, 3 insertions(+), 2 deletions(-)
14
15 diff --git a/misc/install-xattr/install-xattr.c b/misc/install-xattr/install-xattr.c
16 index 3e20b63..5c8a978 100644
17 --- a/misc/install-xattr/install-xattr.c
18 +++ b/misc/install-xattr/install-xattr.c
19 @@ -239,7 +239,7 @@ main(int argc, char* argv[])
20 int target_is_directory = 0; /* is the target a directory? */
21
22 int first, last; /* argv indices of the first file/directory and last */
23 - char *target; /* the target file or directory */
24 + char *target = NULL; /* the target file or directory */
25 char *path; /* path to the target file */
26
27 char *mypath = realpath("/proc/self/exe", NULL); /* path to argv[0] */
28 @@ -331,7 +331,8 @@ main(int argc, char* argv[])
29 char *portage_helper_path = getenv("__PORTAGE_HELPER_PATH");
30 char *portage_helper_canpath = NULL;
31 if (portage_helper_path)
32 - chdir(oldpwd);
33 + if (chdir(oldpwd) != 0)
34 + err(1, "failed to chdir %s", oldpwd);
35
36 switch (fork()) {
37 case -1: