time: remove unnecessary global variable 47/23047/2
authorjy910.yun <jy910.yun@samsung.com>
Mon, 16 Jun 2014 10:56:24 +0000 (19:56 +0900)
committerSabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>
Tue, 17 Jun 2014 08:22:05 +0000 (10:22 +0200)
Signed-off-by: jy910.yun <jy910.yun@samsung.com>
Change-Id: I091db456d3652530e70d1ee295bf81b9788a6458

src/time/time-handler.c

index b6d0474..9b6b85f 100644 (file)
@@ -61,7 +61,6 @@
 #endif
 static const char default_rtc0[] = "/dev/rtc0";
 static const char default_rtc1[] = "/dev/rtc1";
-static const char default_localtime[18];
 
 static const time_t default_time = 2147483645; // max(32bit) -3sec
 static Ecore_Fd_Handler *tfdh = NULL; // tfd change noti
@@ -85,12 +84,13 @@ int handle_timezone(char *str)
        struct stat sts;
        time_t now;
        struct tm *ts;
-       strcpy(default_localtime, tzplatform_mkpath(TZ_SYS_ETC, "localtime"));
-       const char *sympath = default_localtime;
+       const char *sympath, *tzpath;
 
        if (str == NULL)
                return -1;
-       const char *tzpath = str;
+
+       tzpath = str;
+       sympath = tzplatform_mkpath(TZ_SYS_ETC, "localtime");
 
        _D("TZPATH = %s\n", tzpath);