From 80cc5b6c3e64441dbd715d02d2a10b9186d8ab55 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 17 Dec 2006 14:54:01 +0000 Subject: [PATCH] Don't shadow size parameter --- ChangeLog | 5 +++++ glib/gstring.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc227f4..c29503b 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 2673931..7b2b974 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; } -- 2.7.4