diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-01 18:42:39 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-01 18:42:39 +0200 |
commit | df18aac9d59e36b13aca54036af58ca953eb103d (patch) | |
tree | 6bcf08eabaec31456ab07294358aaa077fd65903 /CAN-binder/low-can-binding | |
parent | 5b992c19e04ccb3c4ba0b3314fd4152a9919d98c (diff) |
Fix warning compile
Change-Id: Id0f088f030c0a23b4347c4886a3d756538cbb651
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding')
-rw-r--r-- | CAN-binder/low-can-binding/utils/openxc-utils.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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) |