commit: 52033f4ef3e633a1743de398b49a46ddd1564c99
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat May 25 12:19:03 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat May 25 12:19:03 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=52033f4e
qmanifest: silence warnings on Linux
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
qmanifest.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/qmanifest.c b/qmanifest.c
index b5bbd79..541ab34 100644
--- a/qmanifest.c
+++ b/qmanifest.c
@@ -1772,8 +1772,12 @@ qmanifest_main(int argc, char **argv)
if (*overlay != '/') {
if (portroot[1] == '\0') {
/* resolve the path */
- (void)fchdir(curdirfd);
- (void)realpath(overlay, path);
+ if (fchdir(curdirfd) != 0)
+ continue; /* this shouldn't happen */
+ if (realpath(overlay, path) == NULL && *path ==
'\0') {
+ warn("could not resolve %s", overlay);
+ continue; /* very unlikely */
+ }
} else {
snprintf(path, sizeof(path), "./%s", overlay);
}