ecore-drm: don't declare w & h integers if we don't need them.
authorChris Michael <devilhorns@comcast.net>
Fri, 6 Jun 2014 15:47:33 +0000 (11:47 -0400)
committerChris Michael <devilhorns@comcast.net>
Fri, 6 Jun 2014 15:47:33 +0000 (11:47 -0400)
We only use w & h if one of the dev->abs.rel_* axis values are less
than zero, so let's not declare integers that we May not use until we
need them.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
src/lib/ecore_drm/ecore_drm_evdev.c

index 2857beb..7fd6646 100644 (file)
@@ -100,12 +100,12 @@ _device_configure(Ecore_Drm_Evdev *edev)
 static void
 _device_axis_update(Ecore_Drm_Evdev *dev)
 {
-   int w, h;
-
    if (!dev) return;
 
    if ((dev->abs.rel_w < 0) || (dev->abs.rel_h < 0))
      {
+        int w = 0, h = 0;
+
         ecore_drm_output_size_get(dev->seat->input->dev, 
                                   dev->seat->input->dev->window, &w, &h);
         if ((w) && (h))