aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-01-05 21:22:03 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-01-16 11:44:05 +0100
commit1d0966212b15c0481b506ba35374935601b0c861 (patch)
tree4546aed44cc51b444008cfb450a06b3f338de803
parent05b4c23fbf153fee1c3bda1450c45d2c66b72bae (diff)
Fix misinterpreted return value
Also fix typo in error messages Change-Id: Ib023a43cdbb6b6442872abecb347940c703c5fde Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--policy_manager/policy_manager.cpp6
-rw-r--r--src/window_manager.cpp2
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");
}