[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH 04/18] lib/ukalloc: Move `uk_zalloc()` after `uk_calloc()`



Moves `uk_zalloc()` to a more appropriate location within the
`<uk/alloc.h> header.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 lib/ukalloc/include/uk/alloc.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/ukalloc/include/uk/alloc.h b/lib/ukalloc/include/uk/alloc.h
index aa28bb02..4c6bb872 100644
--- a/lib/ukalloc/include/uk/alloc.h
+++ b/lib/ukalloc/include/uk/alloc.h
@@ -48,9 +48,6 @@ extern "C" {
 
 struct uk_alloc;
 
-#define uk_zalloc(a, size)  uk_calloc(a, 1, size)
-#define uk_do_zalloc(a, size) uk_do_calloc(a, 1, size)
-
 typedef void* (*uk_alloc_malloc_func_t)
                (struct uk_alloc *a, size_t size);
 typedef void* (*uk_alloc_calloc_func_t)
@@ -143,6 +140,9 @@ static inline void *uk_calloc(struct uk_alloc *a,
        return uk_do_calloc(a, nmemb, size);
 }
 
+#define uk_do_zalloc(a, size) uk_do_calloc((a), 1, (size))
+#define uk_zalloc(a, size) uk_calloc((a), 1, (size))
+
 static inline void *uk_do_realloc(struct uk_alloc *a,
                                  void *ptr, size_t size)
 {
-- 
2.20.1



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.