diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2012-10-05 14:34:29 +0100 |
---|---|---|
committer | Anthony PERARD <anthony.perard@citrix.com> | 2012-10-05 14:34:29 +0100 |
commit | 3c8ec17b26e686a6601e1a678c090f44464ad514 (patch) | |
tree | 2724d6bdae5bbaca8774089f0146a4e83cbaecb7 /tools/libxl/libxl_internal.c | |
parent | e9a327bbbcab127625b0917a2780cb3601a81d01 (diff) | |
download | xen-3c8ec17b26e686a6601e1a678c090f44464ad514.tar.gz xen-3c8ec17b26e686a6601e1a678c090f44464ad514.tar.bz2 xen-3c8ec17b26e686a6601e1a678c090f44464ad514.zip |
libxl: Move gc_is_real to libxl_internal.h.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_internal.c')
-rw-r--r-- | tools/libxl/libxl_internal.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index 211c8f5e2f..5a8cd38bf9 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -30,16 +30,11 @@ void libxl__alloc_failed(libxl_ctx *ctx, const char *func, #undef L } -static int gc_is_real(const libxl__gc *gc) -{ - return gc->alloc_maxsize >= 0; -} - void libxl__ptr_add(libxl__gc *gc, void *ptr) { int i; - if (!gc_is_real(gc)) + if (!libxl__gc_is_real(gc)) return; if (!ptr) @@ -71,7 +66,7 @@ void libxl__free_all(libxl__gc *gc) void *ptr; int i; - assert(gc_is_real(gc)); + assert(libxl__gc_is_real(gc)); for (i = 0; i < gc->alloc_maxsize; i++) { ptr = gc->alloc_ptrs[i]; @@ -111,7 +106,7 @@ void *libxl__realloc(libxl__gc *gc, void *ptr, size_t new_size) if (ptr == NULL) { libxl__ptr_add(gc, new_ptr); - } else if (new_ptr != ptr && gc_is_real(gc)) { + } else if (new_ptr != ptr && libxl__gc_is_real(gc)) { for (i = 0; i < gc->alloc_maxsize; i++) { if (gc->alloc_ptrs[i] == ptr) { gc->alloc_ptrs[i] = new_ptr; |