sensord: clean up switch-case statement if attribute is not global. 79/77279/1
authorkibak.yoon <kibak.yoon@samsung.com>
Mon, 27 Jun 2016 04:27:25 +0000 (13:27 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Wed, 29 Jun 2016 02:49:55 +0000 (11:49 +0900)
- if it is a default attribute in switch-case statement, break and call
  set_attribute_int() function.

Change-Id: I1bf0403ad268a8465190439acd9c1ebe320cda2c
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/client/client.cpp

index 129958c..171cb88 100644 (file)
@@ -1129,10 +1129,10 @@ API int sensord_set_attribute_int(int handle, int attribute, int value)
        case SENSORD_ATTRIBUTE_AXIS_ORIENTATION:
                return change_axis_orientation(handle, value);
        default:
-               return change_attribute_int(handle, attribute, value);
+               break;
        }
 
-       return OP_SUCCESS;
+       return change_attribute_int(handle, attribute, value);
 }
 
 API int sensord_set_attribute_str(int handle, int attribute, const char *value, int value_len)