Fix warning compile
authorRomain Forlot <romain.forlot@iot.bzh>
Thu, 1 Jun 2017 16:42:39 +0000 (18:42 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Thu, 1 Jun 2017 16:42:39 +0000 (18:42 +0200)
Change-Id: Id0f088f030c0a23b4347c4886a3d756538cbb651
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
CAN-binder/low-can-binding/utils/openxc-utils.cpp

index 1d3cd79..f39f418 100644 (file)
@@ -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)