diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2019-11-04 22:25:56 +0300 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2019-11-04 22:25:56 +0300 |
commit | 3fc76695793ffdf5020016a4f14e0a70b0531daf (patch) | |
tree | 9bd7057d205ace745ca3bbb3ca69a886eaa48972 /include | |
parent | 94997b7dfda4d94313dbf47e7e10cbb4299b8f0a (diff) |
rail fixes
Diffstat (limited to 'include')
-rw-r--r-- | include/freerdp/utils/memory.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/freerdp/utils/memory.h b/include/freerdp/utils/memory.h index f7b843c..f46083d 100644 --- a/include/freerdp/utils/memory.h +++ b/include/freerdp/utils/memory.h @@ -33,6 +33,7 @@ struct shm_info_t FREERDP_API void* xmalloc(size_t size); FREERDP_API void* xzalloc(size_t size); FREERDP_API void* xrealloc(void* ptr, size_t size); +FREERDP_API void* xrealloc_check(void* ptr, size_t size); FREERDP_API void xfree(void* ptr); FREERDP_API char* xstrdup(const char* str); @@ -40,5 +41,7 @@ FREERDP_API struct shm_info_t* create_shm_info(size_t size); FREERDP_API void delete_shm_info(struct shm_info_t* shm_info); #define xnew(_type) (_type*)xzalloc(sizeof(_type)) +#define xnew0(_type, _count) (_type*)calloc(_count, sizeof(_type)) +#define xrenew(_type, _ptr, _count) (_type*)xrealloc_check(_ptr, sizeof(_type) * (_count)) #endif /* __MEMORY_UTILS_H */ |