From 7f1cccb3ea2c94d27b1964530405c953d474bfd0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 9 Sep 2008 10:04:42 +0200 Subject: audio: replaced copyAudioFormat() with simple assignment The "!src" check in copyAudioFormat() used to hide bugs - one should never pass NULL to it. There is one caller which might pass NULL, add a check in this caller. Instead of doing mempcy(), we can simply assign the structures, which looks more natural. --- src/output_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/output_init.c') diff --git a/src/output_init.c b/src/output_init.c index 33352ca2a..d339f3540 100644 --- a/src/output_init.c +++ b/src/output_init.c @@ -103,7 +103,7 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param) FATAL("error parsing format at line %i\n", bp->line); } - copyAudioFormat(&ao->outAudioFormat, &ao->reqAudioFormat); + ao->outAudioFormat = ao->reqAudioFormat; } if (plugin->init(ao, param) != 0) -- cgit v1.2.3