* frame.c (Fmodify_frame_parameters): Simplify loop counter.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Mar 2011 18:09:45 +0000 (11:09 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Mar 2011 18:09:45 +0000 (11:09 -0700)
This also avoids a warning with gcc -Wstrict-overflow.

src/ChangeLog
src/frame.c

index f8ccbfd..d833648 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-21  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * frame.c (Fmodify_frame_parameters): Simplify loop counter.
+       This also avoids a warning with gcc -Wstrict-overflow.
+
        * fileio.c (Fcopy_file): Report error if fchown or fchmod
        fail (Bug#8306).
 
index 05938f3..5c67652 100644 (file)
@@ -2529,8 +2529,9 @@ use is not recommended.  Explicitly check for a frame-parameter instead.  */)
        }
 
       /* Now process them in reverse of specified order.  */
-      for (i--; i >= 0; i--)
+      while (i != 0)
        {
+         i--;
          prop = parms[i];
          val = values[i];
          store_frame_param (f, prop, val);