From 62fee3098a930380a9c8ac49fe242fe2f4d1c015 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 6 Nov 2006 13:03:51 +0000 Subject: [PATCH] ANSI C compliance. --- ChangeLog | 5 +++++ lib/gl_array_list.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd182cc298..008d31b6b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-05 Bruno Haible + + * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement + ANSI C compliant. + 2006-11-03 Bruno Haible Simplify xmalloc expressions. Add overflow check in xmalloc arguments. diff --git a/lib/gl_array_list.c b/lib/gl_array_list.c index 918303dc27..9537b1fb53 100644 --- a/lib/gl_array_list.c +++ b/lib/gl_array_list.c @@ -439,8 +439,8 @@ gl_array_iterator_next (gl_list_iterator_t *iterator, abort (); /* The last returned element was removed. */ iterator->count--; - iterator->p--; - iterator->q--; + iterator->p = (const void **) iterator->p - 1; + iterator->q = (const void **) iterator->q - 1; } if (iterator->p < iterator->q) { -- 2.30.2