commit:     68e6854a19a5a42b7b1ac62e6ea3b96baaaf5699
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 19 16:40:24 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Jan 19 16:40:24 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=68e6854a

qmanifest: fix Coverity 206557 Argument cannot be negative

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 qmanifest.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/qmanifest.c b/qmanifest.c
index de4bf9b..bd04b96 100644
--- a/qmanifest.c
+++ b/qmanifest.c
@@ -1770,8 +1770,10 @@ qmanifest_main(int argc, char **argv)
                }
        }
 
-       if ((curdirfd = open(".", O_RDONLY)) < 0)
+       if ((curdirfd = open(".", O_RDONLY)) < 0) {
                warn("cannot open current directory?!? %s\n", strerror(errno));
+               return EXIT_FAILURE;
+       }
 
        ret = EXIT_SUCCESS;
        argc -= optind;

Reply via email to