rem: int	len = sizeof(result);
add: socklen_t len = sizeof(result);
context: inputHandler(int fd, int mask, void *clientData) /*FOLD00*/{    WMConnection *cPtr = (WMConnection*)clientData;    if (cPtr->state==WCClosed || cPtr->state==WCDied)        return;    if ((mask & WIWriteMask)) {        if (cPtr->state == WCInProgress) {            Bool failed;            int	result;            int	len = sizeof(result);            WCErrorCode = 0;            if (getsockopt(cPtr->sock, SOL_SOCKET, SO_ERROR,                           (void*)&result, &len) == 0 && result != 0) {                cPtr->state = WCFailed;                WCErrorCode = result;                failed = True;                /* should call wsyserrorwithcode(result, ...) here? */            } else {                cPtr->state = WCConnected;                failed = False;            }            if (cPtr->handler.write) {                WMDeleteInputHandler(cPtr->handler.write);                cPtr->handler.write = NULL;            }            if (cPtr->openTimeout.handler) {                WMDeleteTimerHandler(cPtr->openTimeout.handler);                cPtr->openTimeout.handler = NULL;            }            if (cPtr->delegate && cPtr->delegate->didInitialize)                (*cPtr->delegate->didInitialize)(cPtr->delegate, cPtr);            /* we use failed and not cPtr->state here, because cPtr may be             * destroyed by the delegate called above if the connection failed             */            if (failed)                return;        } else if (cPtr->state == WCConnected) {            WMFlushConnection(cPtr);        }    }    if (!cPtr->delegate)        return;    /* if the connection died, may get destroyed in the delegate, so retain */    wretain(cPtr);    if ((mask & WIReadMask) && cPtr->delegate->didReceiveInput)        (*cPtr->delegate->didReceiveInput)(cPtr->delegate, cPtr);    if ((mask & WIExceptMask) && cPtr->delegate->didCatchException)        (*cPtr->delegate->didCatchException)(cPtr->delegate, cPtr);    wrelease(cPtr);}