summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungbae Shin <seungbae.shin@samsung.com>2018-08-24 16:56:33 +0900
committerSeungbae Shin <seungbae.shin@samsung.com>2018-08-24 16:59:18 +0900
commitd571bdd9370e8fbbc9b5177cd0cc54b4059b98bc (patch)
treed99ba59d39786704ee31eacbf8271a22dd0df82b
parent47a4be4f97030030ddd2592f650509970d97248b (diff)
downloadaudio-hal-sc7727-d571bdd9370e8fbbc9b5177cd0cc54b4059b98bc.tar.gz
audio-hal-sc7727-d571bdd9370e8fbbc9b5177cd0cc54b4059b98bc.tar.bz2
audio-hal-sc7727-d571bdd9370e8fbbc9b5177cd0cc54b4059b98bc.zip
Fix condition check macro to support multiple expression.submit/tizen/20180827.065040accepted/tizen/unified/20180827.160607
- open temp volume ini if file exists only (to avoid unnecessary stdout error) [Version] 0.1.26 [Issue Type] BUG Change-Id: I70a35e2345a7078aa9a1552967187240c6f2101e
-rw-r--r--packaging/audio-hal-sc7727.spec2
-rw-r--r--tizen-audio-internal.h6
-rw-r--r--tizen-audio-volume.c3
3 files changed, 6 insertions, 5 deletions
diff --git a/packaging/audio-hal-sc7727.spec b/packaging/audio-hal-sc7727.spec
index 7771611..21bc0d3 100644
--- a/packaging/audio-hal-sc7727.spec
+++ b/packaging/audio-hal-sc7727.spec
@@ -1,6 +1,6 @@
Name: audio-hal-sc7727
Summary: TIZEN Audio HAL for SC7727
-Version: 0.1.25
+Version: 0.1.26
Release: 0
Group: System/Libraries
License: Apache-2.0
diff --git a/tizen-audio-internal.h b/tizen-audio-internal.h
index 8bd6f5a..f4b3ff2 100644
--- a/tizen-audio-internal.h
+++ b/tizen-audio-internal.h
@@ -59,19 +59,19 @@
#endif
#define AUDIO_RETURN_IF_FAIL(expr) do { \
- if (!expr) { \
+ if (!(expr)) { \
AUDIO_LOG_ERROR("%s failed", #expr); \
return; \
} \
} while (0)
#define AUDIO_RETURN_VAL_IF_FAIL(expr, val) do { \
- if (!expr) { \
+ if (!(expr)) { \
AUDIO_LOG_ERROR("%s failed", #expr); \
return val; \
} \
} while (0)
#define AUDIO_RETURN_NULL_IF_FAIL(expr) do { \
- if (!expr) { \
+ if (!(expr)) { \
AUDIO_LOG_ERROR("%s failed", #expr); \
return NULL; \
} \
diff --git a/tizen-audio-volume.c b/tizen-audio-volume.c
index a4d3950..12492c7 100644
--- a/tizen-audio-volume.c
+++ b/tizen-audio-volume.c
@@ -188,7 +188,8 @@ static audio_return_t __load_volume_value_table_from_ini(audio_hal_t *ah)
audio_volume_value_table_t *volume_value_table = ah->volume.volume_value_table;
int size = 0;
- dict = iniparser_load(VOLUME_INI_TEMP_PATH);
+ if (access(VOLUME_INI_TEMP_PATH, F_OK) == 0)
+ dict = iniparser_load(VOLUME_INI_TEMP_PATH);
if (!dict) {
AUDIO_LOG_DEBUG("Use default volume&gain ini file");
dict = iniparser_load(VOLUME_INI_DEFAULT_PATH);