Changeset 321

Show
Ignore:
Timestamp:
16/08/2007 13:13:45 (1 year ago)
Author:
nextime
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • packages/main/udsrelay/trunk/udsrelay.c

    r314 r321  
    499499 
    500500                fd_set fds; 
    501                 int i, mfd, max_fd, what, which; 
     501                int i, max_fd, what, which; 
    502502 
    503503                FD_ZERO(&fds); 
     
    506506      FD_SET(s[2], &fds); 
    507507 
    508                 mfd = (s[0] > s[1]) ? s[0] : s[1]; 
    509       max_fd = (mfd > s[2]) ? mfd : s[2]; 
     508      max_fd = MAX(MAX(s[0], s[1]), s[2]); 
    510509 
    511510                if ((i = select(max_fd + 1, &fds, NULL, NULL, NULL)) <= 0) {