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

[Xen-changelog] [xen-unstable] Put the set size in the structure on set-allocation.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1172015953 0
# Node ID df08fe145d24d587151a0551fa292ad6b8b481a5
# Parent  ee3ea729f5de6880c888763330d748c58d4b0031
Put the set size in the structure on set-allocation.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/libxen/include/xen_internal.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r ee3ea729f5de -r df08fe145d24 tools/libxen/include/xen_internal.h
--- a/tools/libxen/include/xen_internal.h       Tue Feb 20 22:54:30 2007 +0000
+++ b/tools/libxen/include/xen_internal.h       Tue Feb 20 23:59:13 2007 +0000
@@ -149,7 +149,10 @@ type__ ## _set *                        
 type__ ## _set *                                                        \
 type__ ## _set_alloc(size_t size)                                       \
 {                                                                       \
-    return calloc(1, sizeof(type__ ## _set) + size * sizeof(type__));   \
+    type__ ## _set *result = calloc(1, sizeof(type__ ## _set) +         \
+                                    size * sizeof(type__));             \
+    result->size = size;                                                \
+    return result;                                                      \
 }                                                                       \
                                                                         \
 void                                                                    \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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