aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>2014-04-28 11:58:37 -0400
committerReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>2014-04-28 23:54:58 -0400
commit8baa5b32a59c9426142cd602aff7aacbb4a3bf7c (patch)
tree65602df92ec1d8d3a23d3d3f3beb90b30274178c
parent6d953ae2c4a49a0e19b558be72fb1a4c46f46705 (diff)
downloadffmpeg-8baa5b32a59c9426142cd602aff7aacbb4a3bf7c.tar.gz
ffserver: do not ignore setsockopt return
Should fix FFmpeg Coverity Scan issue #732181 Signed-off-by: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
-rw-r--r--ffserver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffserver.c b/ffserver.c
index dd5575146e..1d32892340 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -556,7 +556,8 @@ static int socket_open_listen(struct sockaddr_in *my_addr)
}
tmp = 1;
- setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp));
+ if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp)))
+ av_log(NULL, AV_LOG_WARNING, "setsockopt SO_REUSEADDR failed\n");
my_addr->sin_family = AF_INET;
if (bind (server_fd, (struct sockaddr *) my_addr, sizeof (*my_addr)) < 0) {