diff options
author | 2019-04-14 14:39:44 -0400 | |
---|---|---|
committer | 2019-04-14 15:01:51 -0400 | |
commit | 530a6008938d6657e6b64f389c902f365c8f19be (patch) | |
tree | 36ed2347b738bd989b87d70c794883336a1855b5 | |
parent | install-xattr: report any errors by "stat" (diff) | |
download | elfix-530a6008938d6657e6b64f389c902f365c8f19be.tar.gz elfix-530a6008938d6657e6b64f389c902f365c8f19be.tar.bz2 elfix-530a6008938d6657e6b64f389c902f365c8f19be.zip |
install-xattr: address compiler warnings, bug #682110
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r-- | misc/install-xattr/install-xattr.c | 5 |
1 files 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: |