Compare error value explicitly in sound_manager_internal.c 18/237818/2 accepted/tizen/unified/20200707.140850 submit/tizen/20200707.024535
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 6 Jul 2020 02:08:57 +0000 (11:08 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 6 Jul 2020 02:21:03 +0000 (02:21 +0000)
[Version] 0.6.22
[Issue Type] Improvement

Change-Id: Ic4ecfa6c16efc68318b0675f72765d11a9204c72
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-sound-manager.spec
src/sound_manager_internal.c

index 7f6bb34..342823d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.6.21
+Version:    0.6.22
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index dfaba24..a5a40e4 100644 (file)
@@ -304,7 +304,7 @@ int sound_manager_get_device_state_by_id(int device_id, sound_device_state_e *st
 
        LOGI(">> enter");
 
-       if ((ret = mm_sound_get_device_by_id(device_id, &device))) {
+       if ((ret = mm_sound_get_device_by_id(device_id, &device)) != MM_ERROR_NONE) {
                LOGE("failed to mm_sound_get_device_by_id()");
                goto LEAVE;
        }
@@ -733,7 +733,7 @@ int sound_manager_get_device_vendor_id(sound_device_h device, int *vendor_id)
 
        LOGI(">> enter");
 
-       if ((ret = mm_sound_get_device_type(device, &type)))
+       if ((ret = mm_sound_get_device_type(device, &type)) != MM_ERROR_NONE)
                return _convert_sound_manager_error_code(__func__, ret);
 
        if (type != MM_SOUND_DEVICE_TYPE_USB_AUDIO) {
@@ -756,7 +756,7 @@ int sound_manager_get_device_product_id(sound_device_h device, int *product_id)
 
        LOGI(">> enter");
 
-       if ((ret = mm_sound_get_device_type(device, &type)))
+       if ((ret = mm_sound_get_device_type(device, &type)) != MM_ERROR_NONE)
                return _convert_sound_manager_error_code(__func__, ret);
 
        if (type != MM_SOUND_DEVICE_TYPE_USB_AUDIO) {