Commit 585ed6b1 by Stéphane Graber

coverity: Check return value from open

parent af61c481
......@@ -190,6 +190,11 @@ int main(int argc, char *argv[]) {
for (iter = 1; iter <= iterations; iter++) {
int fd;
fd = open("/", O_RDONLY);
if (fd < 0) {
fprintf(stderr, "Failed to open /\n");
continue;
}
if (!quiet)
printf("\nIteration %d/%d maxfd:%d\n", iter, iterations, fd);
close(fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment