mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +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:
parent
f7d8aa212f
commit
e3dc67a44d
1 changed files with 5 additions and 0 deletions
|
|
@ -1492,6 +1492,11 @@ int EchoServer::start() {
|
|||
/* Sleep for a second until we check again for incoming connection requests */
|
||||
nsock_timer_create(nsp, empty_handler, 1000, NULL);
|
||||
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;
|
||||
} /* End of start() */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue