From 00f7ada4b2a337f93ffee090cee8b86950d54cb4 Mon Sep 17 00:00:00 2001 From: Hyungdeuk Kim Date: Mon, 19 Aug 2013 17:24:05 +0900 Subject: [PATCH] fix prevent issue --- alarm-manager.c | 6 +----- packaging/alarm-manager.spec | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/alarm-manager.c b/alarm-manager.c index 23e78e6..972a46b 100755 --- a/alarm-manager.c +++ b/alarm-manager.c @@ -283,8 +283,6 @@ int _set_rtc_time(time_t _time) retval0 = ioctl(fd0, RTC_SET_TIME, &rtc_tm); if (retval0 == -1) { - if (fd0 != -1) - close(fd0); ALARM_MGR_LOG_PRINT("error to ioctl fd0."); perror("\t"); } @@ -295,8 +293,6 @@ int _set_rtc_time(time_t _time) retval1 = ioctl(fd1, RTC_SET_TIME, &rtc_tm); if (retval1 == -1) { - if (fd1 != -1) - close(fd1); ALARM_MGR_LOG_PRINT("error to ioctl fd1."); perror("\t"); } @@ -1534,7 +1530,7 @@ static void __alarm_expired() ALARM_MGR_ASSERT_PRINT("[alarm-server]:Malloc failed!Can't notify alarm expiry info\n"); goto done; } - memset(expire_info, '\0', MAX_SERVICE_NAME_LEN); + memset(expire_info, '\0', sizeof(__expired_alarm_t)); strncpy(expire_info->service_name, destination_app_service_name, MAX_SERVICE_NAME_LEN-1); diff --git a/packaging/alarm-manager.spec b/packaging/alarm-manager.spec index a2300bd..3d57c20 100755 --- a/packaging/alarm-manager.spec +++ b/packaging/alarm-manager.spec @@ -1,6 +1,6 @@ Name: alarm-manager Summary: Alarm library -Version: 0.4.84 +Version: 0.4.85 Release: 1 Group: System/Libraries License: Apache License, Version 2.0 -- 2.7.4