* w32term.c (w32_read_socket): Avoid temporary
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 17 Sep 2013 15:57:45 +0000 (19:57 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Tue, 17 Sep 2013 15:57:45 +0000 (19:57 +0400)
variables in a call to x_real_positions.
* xterm.c (handle_one_xevent): Likewise.

src/ChangeLog
src/w32term.c
src/xterm.c

index e900cfb..4223573 100644 (file)
@@ -1,3 +1,9 @@
+2013-09-17  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * w32term.c (w32_read_socket): Avoid temporary
+       variables in a call to x_real_positions.
+       * xterm.c (handle_one_xevent): Likewise.
+
 2013-09-17  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
index 59fdf13..331a86e 100644 (file)
@@ -4687,13 +4687,7 @@ w32_read_socket (struct terminal *terminal,
          f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
 
          if (f && !FRAME_ICONIFIED_P (f))
-           {
-             int x, y;
-
-             x_real_positions (f, &x, &y);
-             f->left_pos = x;
-             f->top_pos = y;
-           }
+           x_real_positions (f, &f->left_pos, &f->top_pos);
 
          check_visibility = 1;
          break;
@@ -4756,16 +4750,12 @@ w32_read_socket (struct terminal *terminal,
 
                    if (iconified)
                      {
-                       int x, y;
-
                        /* Reset top and left positions of the Window
                           here since Windows sends a WM_MOVE message
                           BEFORE telling us the Window is minimized
                           when the Window is iconified, with 3000,3000
                           as the co-ords. */
-                       x_real_positions (f, &x, &y);
-                       f->left_pos = x;
-                       f->top_pos = y;
+                       x_real_positions (f, &f->left_pos, &f->top_pos);
 
                        inev.kind = DEICONIFY_EVENT;
                        XSETFRAME (inev.frame_or_window, f);
index fadcdbf..08a360f 100644 (file)
@@ -6129,11 +6129,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       f = x_top_window_to_frame (dpyinfo, event->xreparent.window);
       if (f)
         {
-          int x, y;
           f->output_data.x->parent_desc = event->xreparent.parent;
-          x_real_positions (f, &x, &y);
-          f->left_pos = x;
-          f->top_pos = y;
+          x_real_positions (f, &f->left_pos, &f->top_pos);
 
           /* Perhaps reparented due to a WM restart.  Reset this.  */
           FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
@@ -6827,9 +6824,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
           if (FRAME_GTK_OUTER_WIDGET (f)
               && gtk_widget_get_mapped (FRAME_GTK_OUTER_WIDGET (f)))
 #endif
-            {
-             x_real_positions (f, &f->left_pos, &f->top_pos);
-            }
+           x_real_positions (f, &f->left_pos, &f->top_pos);
 
 #ifdef HAVE_X_I18N
           if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMStatusArea))