pa_context_state_t state;
sound_pa_info_s *pa_info = (sound_pa_info_s *)userdata;
- assert(c);
+ if (!c) {
+ LOGE("pa_context is null");
+ return;
+ }
+
+ if (!pa_info) {
+ LOGE("pa_info is null");
+ return;
+ }
state = pa_context_get_state(c);
}
//LCOV_EXCL_START
-void _pa_stream_state_cb(pa_stream *s, void * userdata)
+void _pa_stream_state_cb(pa_stream *s, void *userdata)
{
pa_stream_state_t state;
virtual_sound_stream_info_s *vstream_h = (virtual_sound_stream_info_s*)userdata;
- assert(s);
+ if (!s) {
+ LOGE("pa_stream is null");
+ return;
+ }
+
+ if (!vstream_h) {
+ LOGE("vstream_h is null");
+ return;
+ }
state = pa_stream_get_state(s);
LOGI("vstream_h[%p] index[%d] state[%d]", vstream_h, pa_stream_get_index(s), state);
gsize size = 0;
int i = 0;
- assert(stream_type);
- assert(info);
+ SM_ARG_CHECK(stream_type);
+ SM_ARG_CHECK(info);
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
GError *err = NULL;
const gchar *dbus_ret = NULL;
- assert(info);
+ SM_ARG_CHECK(info);
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
GError *err = NULL;
const gchar *dbus_ret = NULL;
- assert(name);
+ SM_ARG_CHECK(name);
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
GError *err = NULL;
const gchar *dbus_ret = NULL;
- assert(direction);
- assert(volume_type);
- assert(max_level);
+ SM_ARG_CHECK(direction);
+ SM_ARG_CHECK(volume_type);
+ SM_ARG_CHECK(max_level);
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
GError *err = NULL;
const gchar *dbus_ret = NULL;
- assert(direction);
- assert(volume_type);
- assert(level);
+ SM_ARG_CHECK(direction);
+ SM_ARG_CHECK(volume_type);
+ SM_ARG_CHECK(level);
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
int vret = 0;
char volume_path[VCONF_PATH_MAX] = {0,};
- assert(direction);
- assert(volume_type);
+ SM_ARG_CHECK(direction);
+ SM_ARG_CHECK(volume_type);
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
const gchar *dbus_volume_type = NULL;
const gchar *dbus_ret = NULL;
- assert(direction);
- assert(volume_type);
+ SM_ARG_CHECK(direction);
+ SM_ARG_CHECK(volume_type);
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
const gchar *dbus_device_type = NULL;
const gchar *dbus_ret = NULL;
- assert(direction);
- assert(device_type);
+ SM_ARG_CHECK(direction);
+ SM_ARG_CHECK(device_type);
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
GError *err = NULL;
gboolean _is_running;
- assert(is_running);
+ SM_ARG_CHECK(is_running);
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;