Fix the bug that BT share UI does not display 58/75758/1 accepted/tizen/common/20160621.184615 accepted/tizen/mobile/20160622.021608 submit/tizen/20160621.071537
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 21 Jun 2016 08:53:56 +0000 (17:53 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 21 Jun 2016 08:55:45 +0000 (17:55 +0900)
Change-Id: I6b008899a0896146b83e21afaca2431f2c6a6858
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bt-share-ui-view.c

index 470e4fc..12b0584 100755 (executable)
@@ -249,7 +249,7 @@ static void __bt_clear_list_btn_cb(void *data,
 static char *__bt_get_tr_timedate(time_t timestamp)
 {
        struct tm *pt;
-       struct tm *current_time;
+       struct tm current_time;
        time_t rawtime;
        char buf[BT_TIMESTAMP_LEN_MAX] = { 0 };
        int cy;
@@ -261,11 +261,11 @@ static char *__bt_get_tr_timedate(time_t timestamp)
 
        /* Get current time */
        time(&rawtime);
-       localtime_r(&rawtime, current_time);
-       retv_if(current_time == NULL, NULL);
-       cy = current_time->tm_year + 1900;
-       cm = current_time->tm_mon + 1;
-       cd = current_time->tm_mday;
+       localtime_r(&rawtime, &current_time);
+
+       cy = current_time.tm_year + 1900;
+       cm = current_time.tm_mon + 1;
+       cd = current_time.tm_mday;
 
        /* Get recorded time */
        pt = localtime(&timestamp);