From 627926a6cf893cd69560bf5b7d69a15c7eab6826 Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Mon, 1 Jul 2002 12:41:50 +0000 Subject: [PATCH] Add parenthesis to protect macro argument. Spotted by Sam Couter" 2002-07-01 Sebastian Wilhelmi * glib/garray.h: Add parenthesis to protect macro argument. Spotted by Sam Couter" . (#86826) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ glib/garray.h | 2 +- 8 files changed, 36 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 250e5d5..a9a4dd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-07-01 Sebastian Wilhelmi + + * glib/garray.h: Add parenthesis to protect macro + argument. Spotted by Sam Couter" . (#86826) + 2002-06-28 Sebastian Wilhelmi * glib/gmessages.h (g_assert, g_assert_not_reached, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 250e5d5..a9a4dd4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2002-07-01 Sebastian Wilhelmi + + * glib/garray.h: Add parenthesis to protect macro + argument. Spotted by Sam Couter" . (#86826) + 2002-06-28 Sebastian Wilhelmi * glib/gmessages.h (g_assert, g_assert_not_reached, diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 250e5d5..a9a4dd4 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2002-07-01 Sebastian Wilhelmi + + * glib/garray.h: Add parenthesis to protect macro + argument. Spotted by Sam Couter" . (#86826) + 2002-06-28 Sebastian Wilhelmi * glib/gmessages.h (g_assert, g_assert_not_reached, diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 250e5d5..a9a4dd4 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +2002-07-01 Sebastian Wilhelmi + + * glib/garray.h: Add parenthesis to protect macro + argument. Spotted by Sam Couter" . (#86826) + 2002-06-28 Sebastian Wilhelmi * glib/gmessages.h (g_assert, g_assert_not_reached, diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 250e5d5..a9a4dd4 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2002-07-01 Sebastian Wilhelmi + + * glib/garray.h: Add parenthesis to protect macro + argument. Spotted by Sam Couter" . (#86826) + 2002-06-28 Sebastian Wilhelmi * glib/gmessages.h (g_assert, g_assert_not_reached, diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 250e5d5..a9a4dd4 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2002-07-01 Sebastian Wilhelmi + + * glib/garray.h: Add parenthesis to protect macro + argument. Spotted by Sam Couter" . (#86826) + 2002-06-28 Sebastian Wilhelmi * glib/gmessages.h (g_assert, g_assert_not_reached, diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 250e5d5..a9a4dd4 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2002-07-01 Sebastian Wilhelmi + + * glib/garray.h: Add parenthesis to protect macro + argument. Spotted by Sam Couter" . (#86826) + 2002-06-28 Sebastian Wilhelmi * glib/gmessages.h (g_assert, g_assert_not_reached, diff --git a/glib/garray.h b/glib/garray.h index 56b3937..8042183 100644 --- a/glib/garray.h +++ b/glib/garray.h @@ -99,7 +99,7 @@ void g_array_sort_with_data (GArray *array, * cleared spot and shortens the array. remove_fast will again distort * order. */ -#define g_ptr_array_index(array,index) (array->pdata)[index] +#define g_ptr_array_index(array,index) ((array)->pdata)[index] GPtrArray* g_ptr_array_new (void); GPtrArray* g_ptr_array_sized_new (guint reserved_size); gpointer* g_ptr_array_free (GPtrArray *array, -- 2.7.4