Don't shadow size parameter
authorMatthias Clasen <matthiasc@src.gnome.org>
Sun, 17 Dec 2006 14:54:01 +0000 (14:54 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 17 Dec 2006 14:54:01 +0000 (14:54 +0000)
ChangeLog
glib/gstring.c

index bc227f4..c29503b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-17  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gstring.c (g_string_chunk_new): Don't shadow size.
+       (#386760, Kazuki IWAMOTO)
+
 2006-12-16  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/gstring.c: Move more documentation inline.
index 2673931..7b2b974 100644 (file)
@@ -139,15 +139,15 @@ GStringChunk*
 g_string_chunk_new (gsize size)    
 {
   GStringChunk *new_chunk = g_new (GStringChunk, 1);
-  gsize size = 1;    
+  gsize actual_size = 1;    
 
-  size = nearest_power (1, size);
+  actual_size = nearest_power (1, size);
 
   new_chunk->const_table       = NULL;
   new_chunk->storage_list      = NULL;
-  new_chunk->storage_next      = size;
-  new_chunk->default_size      = size;
-  new_chunk->this_size         = size;
+  new_chunk->storage_next      = actual_size;
+  new_chunk->default_size      = actual_size;
+  new_chunk->this_size         = actual_size;
 
   return new_chunk;
 }