Remove a test

if (tcp_rpc_socket > max_sd)
	  max_sd = tcp_rpc_socket;
The condition is always true because max_sd is initialized to -1 and that block
of code is entered only if tcp_rpc_socket > -1. It looks like the kind of thing
that would be managing a large set of sockets for select, but here we're only
selecting on one socket at a time. This was suggested by Lionel Cons.
This commit is contained in:
david 2009-11-12 16:00:16 +00:00
parent b5444fa390
commit e0870187de

View file

@ -519,8 +519,7 @@ void get_rpc_results(Target *target, struct portinfo *scan,
max_sd = udp_rpc_socket;
} else if (tcp_rpc_socket >= 0 && rsi->rpc_current_port->proto == IPPROTO_TCP) {
FD_SET(tcp_rpc_socket, &fds_r);
if (tcp_rpc_socket > max_sd)
max_sd = tcp_rpc_socket;
max_sd = tcp_rpc_socket;
} else {
error("Unable to find listening socket in %s", __func__);
return;