basic: Remove circular dep between alloc-util.h and memory-util.h
This commit is contained in:
+1
-11
@@ -7,7 +7,6 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "macro.h"
|
||||
#include "memory-util-fundamental.h"
|
||||
|
||||
@@ -98,16 +97,7 @@ static inline void* mempmem_safe(const void *haystack, size_t haystacklen, const
|
||||
return (uint8_t*) p + needlelen;
|
||||
}
|
||||
|
||||
static inline void* erase_and_free(void *p) {
|
||||
size_t l;
|
||||
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
||||
l = MALLOC_SIZEOF_SAFE(p);
|
||||
explicit_bzero_safe(p, l);
|
||||
return mfree(p);
|
||||
}
|
||||
void* erase_and_free(void *p);
|
||||
|
||||
static inline void erase_and_freep(void *p) {
|
||||
erase_and_free(*(void**) p);
|
||||
|
||||
Reference in New Issue
Block a user