From 956a08a9c0188b831a3c9d565a0f9976a42c938a Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 30 Nov 2014 13:02:32 +0800 Subject: [PATCH] coverity 83660 plat unix check fcntl return Signed-off-by: Andy Green --- lib/lws-plat-unix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lws-plat-unix.c b/lib/lws-plat-unix.c index 467e394f..cc1c1251 100644 --- a/lib/lws-plat-unix.c +++ b/lib/lws-plat-unix.c @@ -234,7 +234,8 @@ lws_plat_set_socket_options(struct libwebsocket_context *context, int fd) #endif /* We are nonblocking... */ - fcntl(fd, F_SETFL, O_NONBLOCK); + if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) + return 1; return 0; }