Skip to content
Snippets Groups Projects
  • Jonathan Lebon's avatar
    5362f6bc
    fdio: allow NULL for fstatat_allow_noent stbuf · 5362f6bc
    Jonathan Lebon authored
    Often, the caller doesn't actually care about the details of the stat
    struct itself, but just whether the entry exists or not. It does work
    to just pass `NULL` directly to glibc in a quick test, but given that
    the argument is tagged as `__nonnull` and that the documentation does
    not explicitly specify this is supported, let's do this safely.
    5362f6bc
    History
    fdio: allow NULL for fstatat_allow_noent stbuf
    Jonathan Lebon authored
    Often, the caller doesn't actually care about the details of the stat
    struct itself, but just whether the entry exists or not. It does work
    to just pass `NULL` directly to glibc in a quick test, but given that
    the argument is tagged as `__nonnull` and that the documentation does
    not explicitly specify this is supported, let's do this safely.
test-libglnx-fdio.c 8.08 KiB