From 1d0966212b15c0481b506ba35374935601b0c861 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Sat, 5 Jan 2019 21:22:03 +0100 Subject: Fix misinterpreted return value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also fix typo in error messages Change-Id: Ib023a43cdbb6b6442872abecb347940c703c5fde Signed-off-by: José Bollo --- policy_manager/policy_manager.cpp | 6 +++--- src/window_manager.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/policy_manager/policy_manager.cpp b/policy_manager/policy_manager.cpp index 67f7179..1c6995b 100644 --- a/policy_manager/policy_manager.cpp +++ b/policy_manager/policy_manager.cpp @@ -689,7 +689,7 @@ int PolicyManager::timerEvent(sd_event_source *source, uint64_t usec, void *data int PolicyManager::setStateTransitionProcessToSystemd(int event_id, uint64_t delay_ms, std::string role) { struct sd_event_source *event_source; - HMI_DEBUG("wm:pm", "event_id:0x%x delay:%d role:%s", event_id, delay_ms, role.c_str()); + HMI_DEBUG("wm:pm event_id:0x%x delay:%d role:%s", event_id, delay_ms, role.c_str()); if (0 == delay_ms) { @@ -697,7 +697,7 @@ int PolicyManager::setStateTransitionProcessToSystemd(int event_id, uint64_t del &pm::transitionStateWrapper, new int(event_id)); if (0 > ret) { - HMI_ERROR("wm:pm", "Faild to sd_event_add_defer: errno:%d", ret); + HMI_ERROR("wm:pm Failed to sd_event_add_defer: errno:%d", ret); return -1; } } @@ -716,7 +716,7 @@ int PolicyManager::setStateTransitionProcessToSystemd(int event_id, uint64_t del &pm::timerEventWrapper, new int(event_id)); if (0 > ret) { - HMI_ERROR("wm:pm", "Faild to sd_event_add_time: errno:%d", ret); + HMI_ERROR("wm:pm Failed to sd_event_add_time: errno:%d", ret); return -1; } } diff --git a/src/window_manager.cpp b/src/window_manager.cpp index 9537be7..288c967 100644 --- a/src/window_manager.cpp +++ b/src/window_manager.cpp @@ -802,7 +802,7 @@ void WindowManager::emitScreenUpdated(unsigned req_num) int ret = afb_event_push( this->map_afb_event[kListEventName[Event_ScreenUpdated]], j); - if (ret != 0) + if (ret < 0) { HMI_DEBUG("afb_event_push failed: %m"); } -- cgit 1.2.3-korg