ANSI C compliance.
authorBruno Haible <bruno@clisp.org>
Mon, 6 Nov 2006 13:03:51 +0000 (13:03 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 6 Nov 2006 13:03:51 +0000 (13:03 +0000)
ChangeLog
lib/gl_array_list.c

index dd182cc29848d03f40faedc717bc5a39da7c4658..008d31b6b36cb9fe72a57b5312de39523d5e9025 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-05  Bruno Haible  <bruno@clisp.org>
+
+       * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
+       ANSI C compliant.
+
 2006-11-03  Bruno Haible  <bruno@clisp.org>
 
        Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
index 918303dc275851a95039eedbdc9399bedd5b4286..9537b1fb53fd5dd9a596227587303f9ee1a7e546 100644 (file)
@@ -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)
     {