src/ae.cc
/* Resize the maximum set size of the event loop.
 * If the requested set size is smaller than the current set size, but
 * there is already a file descriptor in use that is >= the requested
 * set size minus one, AE_ERR is returned and the operation is not
 * performed at all.
 *
 * Otherwise AE_OK is returned and the operation is successful. */
Resize the maximum set size of the event loop.
If the requested set size is smaller than the current set size, but
there is already a file descriptor in use that is >= the requested
set size minus one, AE_ERR is returned and the operation is not
performed at all.

Otherwise AE_OK is returned and the operation is successful.
Resize the maximum set size of the event loop . If the requested set size is smaller than the current set size but there is already a file descriptor in use that is > = the requested set size minus one AE_ERR is returned and the operation is not performed at all . Otherwise AE_OK is returned and the operation is successful .
int aeResizeSetSize(aeEventLoop *eventLoop, int setsize) {
  int i;
  if (setsize == eventLoop->setsize)
    return AE_OK;
  if (eventLoop->maxfd >= setsize)
    return AE_ERR;
  if (aeApiResize(eventLoop, setsize) == -1)
    return AE_ERR;
  eventLoop->events = (aeFileEvent *) zrealloc(eventLoop->events,
                                               sizeof(aeFileEvent) * setsize);
  eventLoop->fired = (aeFiredEvent *) zrealloc(eventLoop->fired,
                                               sizeof(aeFiredEvent) * setsize);
  eventLoop->setsize = setsize;
  for (i = eventLoop->maxfd + 1; i < setsize; i++)
    eventLoop->events[i].mask = AE_NONE;
  return AE_OK;
}
int aeResizeSetSize ( aeEventLoop * eventLoop , int setsize ) { int i ; if ( setsize == eventLoop -> setsize ) return AE_OK ; if ( eventLoop -> maxfd >= setsize ) return AE_ERR ; if ( aeApiResize ( eventLoop , setsize ) == -1 ) return AE_ERR ; eventLoop -> events = ( aeFileEvent * ) zrealloc ( eventLoop -> events , sizeof ( aeFileEvent ) * setsize ) ; eventLoop -> fired = ( aeFiredEvent * ) zrealloc ( eventLoop -> fired , sizeof ( aeFiredEvent ) * setsize ) ; eventLoop -> setsize = setsize ; for ( i = eventLoop -> maxfd + 1 ; i < setsize ; i ++ ) eventLoop -> events [ i ] . mask = AE_NONE ; return AE_OK ; }
Resize the maximum set size of the event loop.
Resize the maximum set size of the event loop .
/* Make sure that if we created new slots, they are initialized with
   * an AE_NONE mask. */