Fix last cons in set_wm_state, remove unused variables.
authorJan D <jan.h.d@swipnet.se>
Sun, 14 Nov 2010 10:21:16 +0000 (11:21 +0100)
committerJan D <jan.h.d@swipnet.se>
Sun, 14 Nov 2010 10:21:16 +0000 (11:21 +0100)
* src/xselect.c (x_send_client_event): Remove unused variables cons and
size.

* src/xterm.c (set_wm_state): Add Qnil to final cons.

src/ChangeLog
src/xselect.c
src/xterm.c

index 62b400c..ce28a2b 100644 (file)
@@ -1,3 +1,10 @@
+2010-11-14  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xterm.c (set_wm_state): Add Qnil to final cons.
+
+       * xselect.c (x_send_client_event): Remove unused variables cons and
+       size.
+
 2010-11-14  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * keyboard.c (modify_event_symbol) : Add const to array elements of
index ea64d9c..7b91d6f 100644 (file)
@@ -2544,8 +2544,6 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, At
   struct x_display_info *dpyinfo = check_x_display_info (display);
   Window wdest;
   XEvent event;
-  Lisp_Object cons;
-  int size;
   struct frame *f = check_x_frame (from);
   int to_root;
 
@@ -2593,9 +2591,6 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, At
   if (wdest == 0) wdest = dpyinfo->root_window;
   to_root = wdest == dpyinfo->root_window;
 
-  for (cons = values, size = 0; CONSP (cons); cons = XCDR (cons), ++size)
-    ;
-
   BLOCK_INPUT;
 
   event.xclient.message_type = message_type;
index 277c32d..331ff9a 100644 (file)
@@ -8382,7 +8382,8 @@ set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value)
                         Fcons
                         (make_fixnum_or_float (atom),
                          value != 0
-                         ? make_fixnum_or_float (value) : Qnil)));
+                         ? Fcons (make_fixnum_or_float (value), Qnil)
+                         : Qnil)));
 }
 
 void