diff options
author | Ewan Mellor <ewan@xensource.com> | 2007-02-20 23:59:13 +0000 |
---|---|---|
committer | Ewan Mellor <ewan@xensource.com> | 2007-02-20 23:59:13 +0000 |
commit | 015c384bf9049a0f863a0602c422eb37b83a421a (patch) | |
tree | 969f5023e6a594eaf13b11f97941f7a4a538f09b /tools/libxen | |
parent | 160d895b13cd3e124c5f27ace8442350e101d6d7 (diff) | |
download | xen-015c384bf9049a0f863a0602c422eb37b83a421a.tar.gz xen-015c384bf9049a0f863a0602c422eb37b83a421a.tar.bz2 xen-015c384bf9049a0f863a0602c422eb37b83a421a.zip |
Put the set size in the structure on set-allocation.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen')
-rw-r--r-- | tools/libxen/include/xen_internal.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/libxen/include/xen_internal.h b/tools/libxen/include/xen_internal.h index 324fb88428..ac50de20b2 100644 --- a/tools/libxen/include/xen_internal.h +++ b/tools/libxen/include/xen_internal.h @@ -149,7 +149,10 @@ type__ ## _free(type__ handle) \ 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 \ |