aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/null_output_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-12-13 21:08:15 +0100
committerMax Kellermann <max@duempel.org>2011-12-13 21:57:59 +0100
commit6584897b697e5392c5ef192054991d29aa791842 (patch)
tree2047b7d05a7ab6ad738aac963f11a2858907e994 /src/output/null_output_plugin.c
parentaa4f45b9a56779355f15f867dce9ab0759cb5f7a (diff)
downloadmpd-6584897b697e5392c5ef192054991d29aa791842.tar.gz
mpd-6584897b697e5392c5ef192054991d29aa791842.tar.xz
mpd-6584897b697e5392c5ef192054991d29aa791842.zip
output/null: don't initialize the "timer" attribute in _init()
Unnecessary overhead.
Diffstat (limited to 'src/output/null_output_plugin.c')
-rw-r--r--src/output/null_output_plugin.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/output/null_output_plugin.c b/src/output/null_output_plugin.c
index e680e617c..0865ae055 100644
--- a/src/output/null_output_plugin.c
+++ b/src/output/null_output_plugin.c
@@ -45,7 +45,6 @@ null_init(const struct config_param *param, GError **error_r)
}
nd->sync = config_get_block_bool(param, "sync", true);
- nd->timer = NULL;
return &nd->base;
}
@@ -55,8 +54,6 @@ null_finish(struct audio_output *ao)
{
struct null_data *nd = (struct null_data *)ao;
- assert(nd->timer == NULL);
-
ao_base_finish(&nd->base);
g_free(nd);
}
@@ -78,10 +75,8 @@ null_close(struct audio_output *ao)
{
struct null_data *nd = (struct null_data *)ao;
- if (nd->timer != NULL) {
+ if (nd->sync)
timer_free(nd->timer);
- nd->timer = NULL;
- }
}
static size_t