From d1b6a825ab182cdda0be35c64ec4528c0c581ceb Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 2 Apr 2020 23:49:00 -0700 Subject: [PATCH] lib: merge aligned_malloc.h into lib_common.h It's simpler to declare the library utility functions in lib_common.h rather than use a separate header. --- lib/aligned_malloc.c | 2 +- lib/aligned_malloc.h | 13 ------------- lib/deflate_compress.c | 1 - lib/lib_common.h | 3 +++ 4 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 lib/aligned_malloc.h diff --git a/lib/aligned_malloc.c b/lib/aligned_malloc.c index e714dc7..68254ee 100644 --- a/lib/aligned_malloc.c +++ b/lib/aligned_malloc.c @@ -35,7 +35,7 @@ #include -#include "aligned_malloc.h" +#include "lib_common.h" void * aligned_malloc(size_t alignment, size_t size) diff --git a/lib/aligned_malloc.h b/lib/aligned_malloc.h deleted file mode 100644 index f301a0e..0000000 --- a/lib/aligned_malloc.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * aligned_malloc.c - aligned memory allocation - */ - -#ifndef LIB_ALIGNED_MALLOC_H -#define LIB_ALIGNED_MALLOC_H - -#include "lib_common.h" - -void *aligned_malloc(size_t alignment, size_t size); -void aligned_free(void *ptr); - -#endif /* LIB_ALIGNED_MALLOC_H */ diff --git a/lib/deflate_compress.c b/lib/deflate_compress.c index 6618e29..e3fac43 100644 --- a/lib/deflate_compress.c +++ b/lib/deflate_compress.c @@ -30,7 +30,6 @@ #include #include -#include "aligned_malloc.h" #include "deflate_compress.h" #include "deflate_constants.h" #include "unaligned.h" diff --git a/lib/lib_common.h b/lib/lib_common.h index e3f33ef..059c8ed 100644 --- a/lib/lib_common.h +++ b/lib/lib_common.h @@ -32,4 +32,7 @@ #define _cpu_features SYM_FIXUP(_cpu_features) #define setup_cpu_features SYM_FIXUP(setup_cpu_features) +void *aligned_malloc(size_t alignment, size_t size); +void aligned_free(void *ptr); + #endif /* LIB_LIB_COMMON_H */