Commit 638d76dc authored by Jean-Paul Saman's avatar Jean-Paul Saman

examples/dvbinfo/tcp.c: handle setsockopt error (CID 17232)

parent a69ffcdd
......@@ -141,7 +141,8 @@ int tcp_open(const char *ipaddress, int port)
}
#endif
setsockopt (s_ctl, SOL_SOCKET, SO_REUSEADDR, &(int){ 1 }, sizeof (int));
if (setsockopt (s_ctl, SOL_SOCKET, SO_REUSEADDR, &(int){ 1 }, sizeof (int)) < 0)
perror("tcp setsockopt error");
result = connect( s_ctl, ptr->ai_addr, ptr->ai_addrlen );
if (result < 0)
......
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