diff options
author | harti <harti@FreeBSD.org> | 2012-05-22 09:59:49 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2012-05-22 09:59:49 +0000 |
commit | 72726b2f32de1148afe56527b9425e60f48d8242 (patch) | |
tree | f453cdc77edd8144b2d96ebf22cf5f0e6d936fa4 | |
parent | a673c602f0c1f65e6015e485031fdc12dabd4ece (diff) | |
download | FreeBSD-src-72726b2f32de1148afe56527b9425e60f48d8242.zip FreeBSD-src-72726b2f32de1148afe56527b9425e60f48d8242.tar.gz |
Fix a compilation error with some compilers: __attribute__
requires two parenthesis for its argument, but instead of using
__attribute__ directly, use the appropriate __nonnull macro
from cdefs.h.
-rw-r--r-- | include/malloc_np.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/malloc_np.h b/include/malloc_np.h index 699077f..e130552 100644 --- a/include/malloc_np.h +++ b/include/malloc_np.h @@ -55,13 +55,11 @@ int mallctlbymib(const size_t *mib, size_t miblen, void *oldp, #define ALLOCM_ERR_OOM 1 #define ALLOCM_ERR_NOT_MOVED 2 -int allocm(void **ptr, size_t *rsize, size_t size, int flags) - __attribute__(nonnull(1)); +int allocm(void **ptr, size_t *rsize, size_t size, int flags) __nonnull(1); int rallocm(void **ptr, size_t *rsize, size_t size, size_t extra, - int flags) __attribute__(nonnull(1)); -int sallocm(const void *ptr, size_t *rsize, int flags) - __attribute__(nonnull(1)); -int dallocm(void *ptr, int flags) __attribute__(nonnull(1)); + int flags) __nonnull(1); +int sallocm(const void *ptr, size_t *rsize, int flags) __nonnull(1); +int dallocm(void *ptr, int flags) __nonnull(1); int nallocm(size_t *rsize, size_t size, int flags); __END_DECLS |