1 |
commit: 68e6854a19a5a42b7b1ac62e6ea3b96baaaf5699 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 19 16:40:24 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 19 16:40:24 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=68e6854a |
7 |
|
8 |
qmanifest: fix Coverity 206557 Argument cannot be negative |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
qmanifest.c | 4 +++- |
13 |
1 file changed, 3 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/qmanifest.c b/qmanifest.c |
16 |
index de4bf9b..bd04b96 100644 |
17 |
--- a/qmanifest.c |
18 |
+++ b/qmanifest.c |
19 |
@@ -1770,8 +1770,10 @@ qmanifest_main(int argc, char **argv) |
20 |
} |
21 |
} |
22 |
|
23 |
- if ((curdirfd = open(".", O_RDONLY)) < 0) |
24 |
+ if ((curdirfd = open(".", O_RDONLY)) < 0) { |
25 |
warn("cannot open current directory?!? %s\n", strerror(errno)); |
26 |
+ return EXIT_FAILURE; |
27 |
+ } |
28 |
|
29 |
ret = EXIT_SUCCESS; |
30 |
argc -= optind; |