WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Make the string->string map and int->floa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Make the string->string map and int->float map allocation functions set the
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 Feb 2007 13:35:25 -0800
Delivery-date: Thu, 01 Feb 2007 13:50:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1170356417 0
# Node ID a357bed2daf8096bb5c682d454a2b3af652fc73f
# Parent  23bf61e72279682f46342d8c01977bed63ceb5be
Make the string->string map and int->float map allocation functions set the
map size on allocation.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/libxen/src/xen_int_float_map.c     |    6 ++++--
 tools/libxen/src/xen_string_string_map.c |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff -r 23bf61e72279 -r a357bed2daf8 tools/libxen/src/xen_int_float_map.c
--- a/tools/libxen/src/xen_int_float_map.c      Thu Feb 01 18:45:50 2007 +0000
+++ b/tools/libxen/src/xen_int_float_map.c      Thu Feb 01 19:00:17 2007 +0000
@@ -25,8 +25,10 @@ xen_int_float_map *
 xen_int_float_map *
 xen_int_float_map_alloc(size_t size)
 {
-    return calloc(1, sizeof(xen_int_float_map) +
-                  size * sizeof(struct xen_int_float_map_contents));
+    xen_int_float_map *result = calloc(1, sizeof(xen_int_float_map) +
+                                       size * sizeof(struct 
xen_int_float_map_contents));
+    result->size = size;
+    return result;
 }
 
 
diff -r 23bf61e72279 -r a357bed2daf8 tools/libxen/src/xen_string_string_map.c
--- a/tools/libxen/src/xen_string_string_map.c  Thu Feb 01 18:45:50 2007 +0000
+++ b/tools/libxen/src/xen_string_string_map.c  Thu Feb 01 19:00:17 2007 +0000
@@ -25,8 +25,10 @@ xen_string_string_map *
 xen_string_string_map *
 xen_string_string_map_alloc(size_t size)
 {
-    return calloc(1, sizeof(xen_string_string_map) +
-                  size * sizeof(struct xen_string_string_map_contents));
+    xen_string_string_map *result = calloc(1, sizeof(xen_string_string_map) +
+                                           size * sizeof(struct 
xen_string_string_map_contents));
+    result->size = size;
+    return result;
 }
 
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Make the string->string map and int->float map allocation functions set the, Xen patchbot-unstable <=