Remove the duplicated local variable 80/173780/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 26 Mar 2018 01:57:04 +0000 (10:57 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 26 Mar 2018 02:02:21 +0000 (11:02 +0900)
 - No need to copy 'appId' from 'id'.
 - Changed to use 'appId' directly and free its memory.

Change-Id: I36a8464ffb16b0a3e93592595bcf2cdb2e647a12
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali/internal/adaptor/tizen/adaptor-impl-tizen.cpp

index 1dfd267..35dbcea 100644 (file)
@@ -101,16 +101,14 @@ void Adaptor::SurfaceInitialized()
     return;
   }
   char *appId;
-  char *id;
-  app_get_id(&id);
+  app_get_id(&appId);
 
   // Use strdup() in app_get_id(), so need to free memory
-  if( id )
+  if( appId )
   {
-    appId = id;
     Ecore_Wl_Window* ecoreWlWindow = AnyCast<Ecore_Wl_Window*>( mNativeWindow );
     screen_connector_provider_remote_enable(appId, ecore_wl_window_surface_get(ecoreWlWindow));
-    free( id );
+    free( appId );
   }
 #endif
 }