From: Matthias Clasen Date: Sun, 17 Dec 2006 14:54:01 +0000 (+0000) Subject: Don't shadow size parameter X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=80cc5b6c3e64441dbd715d02d2a10b9186d8ab55;p=dana%2Fcg-glib.git Don't shadow size parameter --- diff --git a/ChangeLog b/ChangeLog index bc227f4d..c29503bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-12-17 Matthias Clasen + + * glib/gstring.c (g_string_chunk_new): Don't shadow size. + (#386760, Kazuki IWAMOTO) + 2006-12-16 Matthias Clasen * glib/gstring.c: Move more documentation inline. diff --git a/glib/gstring.c b/glib/gstring.c index 26739311..7b2b9749 100644 --- a/glib/gstring.c +++ b/glib/gstring.c @@ -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; }