From df18aac9d59e36b13aca54036af58ca953eb103d Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 1 Jun 2017 18:42:39 +0200 Subject: Fix warning compile Change-Id: Id0f088f030c0a23b4347c4886a3d756538cbb651 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/utils/openxc-utils.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'CAN-binder') diff --git a/CAN-binder/low-can-binding/utils/openxc-utils.cpp b/CAN-binder/low-can-binding/utils/openxc-utils.cpp index 1d3cd79..f39f418 100644 --- a/CAN-binder/low-can-binding/utils/openxc-utils.cpp +++ b/CAN-binder/low-can-binding/utils/openxc-utils.cpp @@ -272,9 +272,12 @@ const openxc_DynamicField build_DynamicField(bool value) int get_bool_from_DynamicField(const openxc_VehicleMessage& v_msg, bool* ret) { if(v_msg.has_simple_message && v_msg.simple_message.has_value && v_msg.simple_message.value.has_boolean_value) - {*ret = v_msg.simple_message.value.boolean_value;} - else - {return -1;} + { + *ret = v_msg.simple_message.value.boolean_value; + return 0; + } + + return -1; } double get_numerical_from_DynamicField(const openxc_VehicleMessage& v_msg) -- cgit 1.2.3-korg