From: Hyihong Chae Date: Mon, 7 Mar 2016 11:41:40 +0000 (+0900) Subject: fix svace issue X-Git-Tag: submit/tizen/20160308.030512^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F61382%2F1;p=platform%2Fcore%2Fapi%2Fmtp.git fix svace issue Change-Id: I615c0ae3c297bdeb19f40d71aa249bf843ff5584 Signed-off-by: HyiHong Chae --- diff --git a/packaging/capi-network-mtp.spec b/packaging/capi-network-mtp.spec index 6925585..cda459a 100755 --- a/packaging/capi-network-mtp.spec +++ b/packaging/capi-network-mtp.spec @@ -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 diff --git a/test/mtp_unit_test.c b/test/mtp_unit_test.c index 68b6f2d..03bbbe2 100755 --- a/test/mtp_unit_test.c +++ b/test/mtp_unit_test.c @@ -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); }