Ecore wl2: Limit scope of variable (fix shadow warning).
authorTom Hacohen <tom@stosb.com>
Mon, 21 Dec 2015 11:15:24 +0000 (11:15 +0000)
committerTom Hacohen <tom@stosb.com>
Mon, 21 Dec 2015 11:15:24 +0000 (11:15 +0000)
src/lib/ecore_wl2/ecore_wl2_display.c

index e04ebae..48eec25 100644 (file)
@@ -388,13 +388,14 @@ ecore_wl2_display_create(const char *name)
 {
    Ecore_Wl2_Display *ewd;
    struct wl_event_loop *loop;
-   const char *n;
 
    if (!_server_displays)
      _server_displays = eina_hash_string_superfast_new(NULL);
 
    if (!name)
      {
+        const char *n;
+
         /* someone wants to create a new server */
         n = getenv("WAYLAND_DISPLAY");
         if (n)