Commit cd4964cd authored by Max Kellermann's avatar Max Kellermann

pulse: don't check config_param!=NULL

The conf.h functions deal well with config_param==NULL and will return the specified default value then.
parent 74273d41
...@@ -170,12 +170,9 @@ pulse_mixer_init(const struct config_param *param) ...@@ -170,12 +170,9 @@ pulse_mixer_init(const struct config_param *param)
pm->volume = g_new(struct pa_cvolume,1); pm->volume = g_new(struct pa_cvolume,1);
pm->server = param != NULL pm->server = config_dup_block_string(param, "server", NULL);
? config_dup_block_string(param, "server", NULL) : NULL; pm->sink = config_dup_block_string(param, "sink", NULL);
pm->sink = param != NULL pm->output_name = config_dup_block_string(param, "name", NULL);
? config_dup_block_string(param, "sink", NULL) : NULL;
pm->output_name = param != NULL
? config_dup_block_string(param, "name", NULL) : NULL;
return &pm->base; return &pm->base;
} }
......
...@@ -70,10 +70,8 @@ pulse_init(G_GNUC_UNUSED const struct audio_format *audio_format, ...@@ -70,10 +70,8 @@ pulse_init(G_GNUC_UNUSED const struct audio_format *audio_format,
pd = pulse_new_data(); pd = pulse_new_data();
pd->name = config_get_block_string(param, "name", "mpd_pulse"); pd->name = config_get_block_string(param, "name", "mpd_pulse");
pd->server = param != NULL pd->server = config_dup_block_string(param, "server", NULL);
? config_dup_block_string(param, "server", NULL) : NULL; pd->sink = config_dup_block_string(param, "sink", NULL);
pd->sink = param != NULL
? config_dup_block_string(param, "sink", NULL) : NULL;
return pd; return pd;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment