Skip to content
  • Thomas Haller's avatar
    all: assert that native errno numbers are positive · 4d9918aa
    Thomas Haller authored
    Use the NM_ERRNO_NATIVE() macro that asserts that these errno numbers are
    indeed positive. Using the macro also serves as a documentation of what
    the meaning of these numbers is.
    
    That is often not obvious, whether we have an nm_errno(), an nm_errno_native()
    (from <errno.h>), or another error number (e.g. WaitForNlResponseResult). This
    situation already improved by merging netlink error codes (nle),
    NMPlatformError enum and <errno.h> as nm_errno(). But we still must
    always be careful about not to mix error codes from different
    domains or transform them appropriately (like nm_errno_from_native()).
    4d9918aa