Welcome! Log In Create A New Profile

Advanced

[njs] Fixing Coverity warnings related to close() (CID 1444170).

Dmitry Volyntsev
October 08, 2019 08:58AM
details: https://hg.nginx.org/njs/rev/9f1ba171d81e
branches:
changeset: 1176:9f1ba171d81e
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Tue Oct 08 15:56:58 2019 +0300
description:
Fixing Coverity warnings related to close() (CID 1444170).

diffstat:

src/njs_module.c | 2 +-
src/njs_shell.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r b63351157159 -r 9f1ba171d81e src/njs_module.c
--- a/src/njs_module.c Mon Sep 30 11:41:00 2019 +0300
+++ b/src/njs_module.c Tue Oct 08 15:56:58 2019 +0300
@@ -139,7 +139,7 @@ njs_parser_module(njs_vm_t *vm, njs_pars

ret = njs_module_read(vm, info.fd, &text);

- close(info.fd);
+ (void) close(info.fd);

if (njs_slow_path(ret != NJS_OK)) {
njs_internal_error(vm, "while reading \"%V\" module", &name);
diff -r b63351157159 -r 9f1ba171d81e src/njs_shell.c
--- a/src/njs_shell.c Mon Sep 30 11:41:00 2019 +0300
+++ b/src/njs_shell.c Tue Oct 08 15:56:58 2019 +0300
@@ -633,7 +633,7 @@ done:
close_fd:

if (fd != STDIN_FILENO) {
- close(fd);
+ (void) close(fd);
}

return ret;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixing Coverity warnings related to close() (CID 1444170).

Dmitry Volyntsev 68 October 08, 2019 08:58AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 82
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready