diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-10-23 19:24:07 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-10-24 19:30:31 -0200 |
| commit | b11b57723b963fb5d0ab11748b7957f0b7fa5d37 (patch) | |
| tree | 55ddd237d50698bc0a53a42b41def519b337c935 /zebra/debug.c | |
| parent | cbb65f5ef53d9029811e248608125ffa293753eb (diff) | |
lib: optimize sockunion_connect()
This function is only called with non-blocking sockets [1], so there's
no need to worry about setting O_NONBLOCK and unsetting it later if the
given fd was a blocking socket. This saves us 4 syscalls per connect,
which is not much but is something.
Also, remove an outdated comment about the return values of this
function. It returns a 'connect_result' enum now, whose values are
self-explanatory (connect_error, connect_success and connect_in_progress).
This also fixes a coverity scan warning where we weren't checking the
return value of the fcntl() syscall.
[1] bgp_connect() and pim_msdp_sock_connect().
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/debug.c')
0 files changed, 0 insertions, 0 deletions
