Ignore:
Timestamp:
Dec 21, 2009, 10:03:19 PM (12 years ago)
Author:
livings124
Message:

avoid an extra comparison caused by macro expansion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r9809 r9810  
    833833        const int open_max = sysconf( _SC_OPEN_MAX );
    834834        getrlimit( RLIMIT_NOFILE, &rlim );
    835         rlim.rlim_cur = MIN( MAX( 1024, open_max ), rlim.rlim_max );
     835        rlim.rlim_cur = MAX( 1024, open_max );
     836        rlim.rlim_cur = MIN( rlim.rlim_cur, rlim.rlim_max );
    836837        setrlimit( RLIMIT_NOFILE, &rlim );
    837838        tr_dbg( "setrlimit( RLIMIT_NOFILE, %d )", (int)rlim.rlim_cur );
Note: See TracChangeset for help on using the changeset viewer.