mirror of
https://github.com/nmap/nmap.git
synced 2025-12-14 11:49:01 +00:00
Added error handling code for the loopret variable that was causing this warning"EchoServer.cc: In member function ‘int EchoServer::start()’:
EchoServer.cc:1403:25: warning: variable ‘loopret’ set but not used [-Wunused-but-set-variable]", by simply mimicing the other error handling around nsock_loop elsewhere.
This commit is contained in:
@@ -1492,6 +1492,11 @@ int EchoServer::start() {
|
|||||||
/* Sleep for a second until we check again for incoming connection requests */
|
/* Sleep for a second until we check again for incoming connection requests */
|
||||||
nsock_timer_create(nsp, empty_handler, 1000, NULL);
|
nsock_timer_create(nsp, empty_handler, 1000, NULL);
|
||||||
loopret=nsock_loop(nsp, 1000);
|
loopret=nsock_loop(nsp, 1000);
|
||||||
|
//If something went wrong in nsock_loop, let's just bail out.
|
||||||
|
if (loopret == NSOCK_LOOP_ERROR) {
|
||||||
|
outFatal(QT_3, "Unexpected nsock_loop error.\n");
|
||||||
|
return OP_FAILURE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return OP_SUCCESS;
|
return OP_SUCCESS;
|
||||||
} /* End of start() */
|
} /* End of start() */
|
||||||
|
|||||||
Reference in New Issue
Block a user