ia64/xen-unstable
changeset 14050:df08fe145d24
Put the set size in the structure on set-allocation.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
author | Ewan Mellor <ewan@xensource.com> |
---|---|
date | Tue Feb 20 23:59:13 2007 +0000 (2007-02-20) |
parents | ee3ea729f5de |
children | 2414007d92ba |
files | tools/libxen/include/xen_internal.h |
line diff
1.1 --- a/tools/libxen/include/xen_internal.h Tue Feb 20 22:54:30 2007 +0000 1.2 +++ b/tools/libxen/include/xen_internal.h Tue Feb 20 23:59:13 2007 +0000 1.3 @@ -149,7 +149,10 @@ type__ ## _free(type__ handle) 1.4 type__ ## _set * \ 1.5 type__ ## _set_alloc(size_t size) \ 1.6 { \ 1.7 - return calloc(1, sizeof(type__ ## _set) + size * sizeof(type__)); \ 1.8 + type__ ## _set *result = calloc(1, sizeof(type__ ## _set) + \ 1.9 + size * sizeof(type__)); \ 1.10 + result->size = size; \ 1.11 + return result; \ 1.12 } \ 1.13 \ 1.14 void \