1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

coverity 83656 server check setsockopt return

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-11-30 13:07:11 +08:00
parent abb48113e7
commit f38e7860f4

View file

@ -57,8 +57,9 @@ int lws_context_init_server(struct lws_context_creation_info *info,
/*
* allow us to restart even if old sockets in TIME_WAIT
*/
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(const void *)&opt, sizeof(opt));
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(const void *)&opt, sizeof(opt)) < 0)
return 1;
lws_plat_set_socket_options(context, sockfd);