Fix again svace issue (WGID 308150) 52/197952/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.021205 accepted/tizen/5.5/unified/mobile/hotfix/20201027.080616 accepted/tizen/5.5/unified/wearable/hotfix/20201027.111538 accepted/tizen/unified/20190128.061230 submit/tizen/20190118.015147 submit/tizen_5.5/20191031.000005 submit/tizen_5.5_mobile_hotfix/20201026.185105 submit/tizen_5.5_wearable_hotfix/20201026.184305 tizen_5.5.m2_release
authorsinikang <sinikang@samsung.com>
Thu, 17 Jan 2019 08:49:31 +0000 (17:49 +0900)
committersinikang <sinikang@samsung.com>
Thu, 17 Jan 2019 08:49:31 +0000 (17:49 +0900)
Change-Id: I6aeeaeb4965bfe752b6dc1db5100467e5821d591
Signed-off-by: sinikang <sinikang@samsung.com>
src/time_update.c

index da25289..529b424 100644 (file)
@@ -223,7 +223,7 @@ static gboolean __update_timezone_by_offset(const struct tnoti_network_timeinfo
        } else {
                UChar utf16_timezone[NITZ_TIMEZONE_MAX_LEN] = { 0 };
                UCalendar *cal = NULL;
-               bool in_dst = false;
+               int in_dst = 0;
                UErrorCode ec = U_ZERO_ERROR;
                GList *list = NULL;
 
@@ -239,7 +239,7 @@ static gboolean __update_timezone_by_offset(const struct tnoti_network_timeinfo
                                }
                                in_dst = ucal_inDaylightTime(cal, &ec);
                                dbg("TZ DST:[%d] WANTED DST:[%d][%d]", in_dst, ti->isdst, ti->dstoff);
-                               if (ti->dstoff == (int)in_dst) {
+                               if (ti->dstoff == in_dst) {
                                        found = TRUE;
                                        info("(%s) was selected", timezone_name);
                                        ucal_close(cal);
@@ -311,7 +311,7 @@ GList * nitz_get_tzlist(char *iso)
        const UChar* timezone_id = 0;
        int timezone_id_len = 0;
        int offset = 0;
-       bool in_dst = false;
+       int in_dst = 0;
        GList *tz_list = NULL;
        UCalendar *cal = NULL;
        unsigned int offset_hash = 0;
@@ -329,7 +329,9 @@ GList * nitz_get_tzlist(char *iso)
                        break;
 
                cal = ucal_open(timezone_id, u_strlen(timezone_id), uloc_getDefault(), UCAL_TRADITIONAL, &ec);
-               in_dst = ucal_inDaylightTime(cal, &ec);
+               if (ucal_inDaylightTime(cal, &ec) == TRUE)
+                  in_dst = 1;
+
                offset = ucal_get(cal, UCAL_ZONE_OFFSET, &ec);
                offset_hash = (offset/1800000) + 24;
                ucal_close(cal);