File descriptor close failure is unlikely to happen.
/* Ignore ECONNRESET because we don't really care about it here,
as we are closing the socket down in any case. There might be
unsent data but nothing we can do about that. */
- if (close(_stream->fd) < 0 && errno != ECONNRESET) {
+ if (unlikely(close(_stream->fd) < 0 && errno != ECONNRESET)) {
i_error("file_istream.close(%s) failed: %m",
i_stream_get_name(&_stream->istream));
}
/* Ignore ECONNRESET because we don't really care about it here,
as we are closing the socket down in any case. There might be
unsent data but nothing we can do about that. */
- if (close(fstream->fd) < 0 && errno != ECONNRESET) {
+ if (unlikely(close(fstream->fd) < 0 && errno != ECONNRESET)) {
i_error("file_ostream.close(%s) failed: %m",
o_stream_get_name(&fstream->ostream.ostream));
}