]> git.eshelyaron.com Git - emacs.git/commitdiff
* keyboard.c (syms_of_keyboard): Use the same style as later
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Mar 2011 08:03:03 +0000 (01:03 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Mar 2011 08:03:03 +0000 (01:03 -0700)
in this function when indexing through an array.  This also
works around GCC bug 48267.

src/ChangeLog
src/keyboard.c

index 998e2014c69ae7eb3e8603e3573c15d4c3340763..88190f46179bdbae5d1554fffb417021c7d89d3e 100644 (file)
@@ -1,5 +1,9 @@
 2011-03-24  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * keyboard.c (syms_of_keyboard): Use the same style as later
+       in this function when indexing through an array.  This also
+       works around GCC bug 48267.
+
        * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
 
        * xselect.c (x_check_property_data): Return correct size (Bug#8335).
index fc8622de0a1bb27a243c18eca3883e5d09d5dbc3..72d955637b34212a4a13c2a14f4d6227d2539bb1 100644 (file)
@@ -11574,12 +11574,12 @@ syms_of_keyboard (void)
   last_point_position_window = Qnil;
 
   {
-    const struct event_head *p;
+    int i;
+    int len = sizeof (head_table) / sizeof (head_table[0]);
 
-    for (p = head_table;
-        p < head_table + (sizeof (head_table) / sizeof (head_table[0]));
-        p++)
+    for (i = 0; i < len; i++)
       {
+       const struct event_head *p = &head_table[i];
        *p->var = intern_c_string (p->name);
        staticpro (p->var);
        Fput (*p->var, Qevent_kind, *p->kind);