fix svace issue 82/61382/1 accepted/tizen/common/20160308.142838 accepted/tizen/ivi/20160308.101218 accepted/tizen/mobile/20160308.101113 accepted/tizen/tv/20160308.101135 accepted/tizen/wearable/20160308.101159 submit/tizen/20160308.030512
authorHyihong Chae <hh.chae@samsung.com>
Mon, 7 Mar 2016 11:41:40 +0000 (20:41 +0900)
committerHyihong Chae <hh.chae@samsung.com>
Mon, 7 Mar 2016 11:41:40 +0000 (20:41 +0900)
Change-Id: I615c0ae3c297bdeb19f40d71aa249bf843ff5584
Signed-off-by: HyiHong Chae <hh.chae@samsung.com>
packaging/capi-network-mtp.spec
test/mtp_unit_test.c

index 6925585..cda459a 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-network-mtp
 Summary:    A MTP library in Native API
-Version:    1.3.9
+Version:    1.3.10
 Release:    1
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
index 68b6f2d..03bbbe2 100755 (executable)
@@ -650,7 +650,7 @@ int objectinfo_test_get_date_created(void)
        int ret = 0;
        int value = 0;
        int list_max = 0;
-       struct tm *loctime;
+       struct tm loctime;
        char tmp[64];
 
        BEGIN();
@@ -661,8 +661,8 @@ int objectinfo_test_get_date_created(void)
                ret = mtp_objectinfo_get_date_created(mtp_device, mtp_objects[i], &value);
                TC_PRT("ret[%d]: object id[%d] mtp_device[%d]", ret, mtp_objects[i], value);
 
-               loctime = localtime((time_t *)&value);
-               strftime(tmp, sizeof(tmp), "%Y/%m/%d-%H:%M:%S", loctime);
+               localtime_r((time_t *)&value, &loctime);
+               strftime(tmp, sizeof(tmp), "%Y/%m/%d-%H:%M:%S", &loctime);
 
                TC_PRT("object id[%d]: created date[%s]", mtp_objects[i], tmp);
        }
@@ -677,7 +677,7 @@ int objectinfo_test_get_date_modified(void)
        int ret = 0;
        int value = 0;
        int list_max = 0;
-       struct tm *loctime;
+       struct tm loctime;
        char tmp[64];
 
        BEGIN();
@@ -688,8 +688,8 @@ int objectinfo_test_get_date_modified(void)
                ret = mtp_objectinfo_get_date_modified(mtp_device, mtp_objects[i], &value);
                TC_PRT("ret[%d]: object id[%d] date_modified[%d]", ret, mtp_objects[i], value);
 
-               loctime = localtime((time_t *)&value);
-               strftime(tmp, sizeof(tmp), "%Y/%m/%d-%H:%M:%S", loctime);
+               localtime_r((time_t *)&value, &loctime);
+               strftime(tmp, sizeof(tmp), "%Y/%m/%d-%H:%M:%S", &loctime);
 
                TC_PRT("object id[%d]: modified date[%s]", mtp_objects[i], tmp);
        }