basic: use _nonnull_if_nonzero_ where appropriate
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
int memfd_create_wrapper(const char *name, unsigned mode);
|
||||
|
||||
int memfd_new_full(const char *name, unsigned extra_flags);
|
||||
@@ -13,7 +15,7 @@ static inline int memfd_new(const char *name) {
|
||||
return memfd_new_full(name, 0);
|
||||
}
|
||||
|
||||
int memfd_new_and_seal(const char *name, const void *data, size_t sz);
|
||||
int memfd_new_and_seal(const char *name, const void *data, size_t sz) _nonnull_if_nonzero_(2, 3);
|
||||
static inline int memfd_new_and_seal_string(const char *name, const char *s) {
|
||||
return memfd_new_and_seal(name, s, SIZE_MAX);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user