1
0
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:
sean
2012-06-19 03:38:04 +00:00
parent f7d8aa212f
commit e3dc67a44d

View File

@@ -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() */