diff options
author | Haru <haru@dotalux.com> | 2016-01-09 21:44:27 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-01-09 21:44:27 +0100 |
commit | e248c3394d7a2a76cfb39e0955ebab648ecc2bf0 (patch) | |
tree | 31d8b0b7de923cff4a49131b82a6ff4de2fd2769 /src/common/ers.h | |
parent | 10f9f4282097f177d6ee0b26572dcf4308e6d6fb (diff) | |
download | hercules-e248c3394d7a2a76cfb39e0955ebab648ecc2bf0.tar.gz hercules-e248c3394d7a2a76cfb39e0955ebab648ecc2bf0.tar.bz2 hercules-e248c3394d7a2a76cfb39e0955ebab648ecc2bf0.tar.xz hercules-e248c3394d7a2a76cfb39e0955ebab648ecc2bf0.zip |
Sanitized various macros
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/ers.h')
-rw-r--r-- | src/common/ers.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/ers.h b/src/common/ers.h index 938882edd..1689345dc 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -148,15 +148,15 @@ typedef struct eri { #ifdef DISABLE_ERS // Use memory manager to allocate/free and disable other interface functions -# define ers_alloc(obj,type) (type *)aMalloc(sizeof(type)) -# define ers_free(obj,entry) aFree(entry) -# define ers_entry_size(obj) (size_t)0 -# define ers_destroy(obj) -# define ers_chunk_size(obj,size) +# define ers_alloc(obj,type) ((void)(obj), (type *)aMalloc(sizeof(type))) +# define ers_free(obj,entry) ((void)(obj), aFree(entry)) +# define ers_entry_size(obj) ((void)(obj), (size_t)0) +# define ers_destroy(obj) ((void)(obj), (void)0) +# define ers_chunk_size(obj,size) ((void)(obj), (void)(size), (size_t)0) // Disable the public functions # define ers_new(size,name,options) NULL -# define ers_report() -# define ers_final() +# define ers_report() (void)0 +# define ers_final() (void)0 #else /* not DISABLE_ERS */ // These defines should be used to allow the code to keep working whenever // the system is disabled |