Ignore:
Timestamp:
12/29/12 10:03:12 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Moved the storage of the error code to where it belongs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/xplcommon/posix/WaitableEvent.cc

    r8 r14  
    3232#include "WaitableEvent.h"
    3333
    34 #include <cassert>
    35 #include <cerrno>
    36 #include <cstdio>
    37 
    3834#include <poll.h>
    3935#include <unistd.h>
     
    5147    fired(false)
    5248{
    53     assert(fd>=0);
     49    if (fd<0) {
     50        setErrorCodeFromErrno();
     51    }
    5452}
    5553
     
    6866    if (write(fd, &one, sizeof(one))<0) {
    6967        if (errno!=EAGAIN) {
    70             setErrorCode(errno);
     68            setErrorCodeFromErrno();
    7169        }
    7270    }
     
    111109    if (read(fd, &value, sizeof(value))<0) {
    112110        if (errno!=EAGAIN) {
    113             setErrorCode(errno);
     111            setErrorCodeFromErrno();
    114112        }
    115113    } else {
Note: See TracChangeset for help on using the changeset viewer.