VirtualBox

Changeset 77110 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Feb 1, 2019 11:00:12 AM (6 years ago)
Author:
vboxsync
Message:

RTErrConvertFromErrno(): Convert the uNativeCode parameter from unsigned to int. errno is specified to be of type int and while it should only ever contain positive values RTErrConvertFromErrno() is also used inside the various kernel drivers where errno does not exist and the return code might be negative as well. The example here is ERESTART (-1) on FreeBSD causing a compile error with clang and this fix is cleaner IMO instead of casting ERSTART to unsigned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/errcore.h

    r76585 r77110  
    232232 *
    233233 * @returns iprt status code.
    234  * @param   uNativeCode    errno code.
    235  */
    236 RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode);
     234 * @param   iNativeCode    errno code.
     235 */
     236RTDECL(int)  RTErrConvertFromErrno(int iNativeCode);
    237237
    238238/**
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