mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fixed current and potential bugs caught by Coverity
Change-Id: I9f9d09dc797ffea062eeb49c881be1d5acb63d7b
This commit is contained in:
committed by
Peter Johnson
parent
b0fec4089b
commit
055ee09825
@@ -149,7 +149,10 @@ unsigned int CameraServer::GetQuality() {
|
||||
void CameraServer::Serve() {
|
||||
int sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
if (sock == -1) wpi_setErrnoError();
|
||||
if (sock == -1) {
|
||||
wpi_setErrnoError();
|
||||
return;
|
||||
}
|
||||
|
||||
int reuseAddr = 1;
|
||||
if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuseAddr,
|
||||
|
||||
Reference in New Issue
Block a user