• Andy Pan's avatar
    Re-indent code and reduce code being complied on Solaris for anetKeepAlive (#12914) · 50b8b997
    Andy Pan authored
    This is a follow-up PR for #12782, in which we introduced nested
    preprocessor directives for TCP keep-alive on Solaris and added
    redundant indentation for code. Besides, it could result in unreachable
    code due to the lack of `#else` on the latest Solaris 11.4 where
    `TCP_KEEPIDLE`, `TCP_KEEPINTVL`, and `TCP_KEEPCNT` are available. As a
    result, this PR does three main things:
    
    - To eliminate the redundant indention for C code in nested preprocessor
    directives
    - To add `#else` directives and move `TCP_KEEPALIVE_THRESHOLD` +
    `TCP_KEEPALIVE_ABORT_THRESHOLD` settings under it, avoid unreachable
    code and compiler warnings when `#if defined(TCP_KEEPIDLE) &&
    defined(TCP_KEEPINTVL) && defined(TCP_KEEPCNT)` is met on Solaris 11.4
    - To remove a few trailing whitespace in comments
    50b8b997
anet.c 26.9 KB