VirtualBox

Changeset 52759 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Sep 16, 2014 11:45:41 AM (10 years ago)
Author:
vboxsync
Message:

timer-posix.cpp: timer_settime returns 0 or -1 + errno, not errno as expected by the code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/timer-posix.cpp

    r48935 r52759  
    669669        TimerSpec.it_value.tv_nsec    = 0;
    670670        int err = timer_settime(pTimer->NativeTimer, 0, &TimerSpec, NULL); NOREF(err);
    671         AssertMsg(!err, ("%d\n", err));
     671        AssertMsg(!err, ("%d / %d\n", err, errno));
    672672    }
    673673#endif
     
    766766    TimerSpec.it_interval.tv_nsec = pTimer->u64NanoInterval % 1000000000;
    767767    int err = timer_settime(pTimer->NativeTimer, 0, &TimerSpec, NULL);
    768     int rc = RTErrConvertFromErrno(err);
     768    int rc = err == 0 ? VINF_SUCCESS : RTErrConvertFromErrno(errno);
    769769#endif /* IPRT_WITH_POSIX_TIMERS */
    770770
     
    813813    TimerSpec.it_value.tv_nsec    = 0;
    814814    int err = timer_settime(pTimer->NativeTimer, 0, &TimerSpec, NULL);
    815     int rc = RTErrConvertFromErrno(err);
     815    int rc = err == 0 ? VINF_SUCCESS : RTErrConvertFromErrno(errno);
    816816#endif /* IPRT_WITH_POSIX_TIMERS */
    817817
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette