From c36307a2819b65845568696808430a3753e658e4 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 9 Oct 2012 23:07:24 +0200 Subject: [PATCH] amp: Remove pointless private_amp_data->conf. There is no need to store the configuration of the amp filter in its privata_data structure since we can always get it via the filter node pointer. --- amp_filter.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/amp_filter.c b/amp_filter.c index dd2c6194..2edfdd58 100644 --- a/amp_filter.c +++ b/amp_filter.c @@ -23,7 +23,6 @@ extern char *stat_item_values[NUM_STAT_ITEMS]; /** Data specific to the amplify filter. */ struct private_amp_data { /** Points to the configuration data for this instance of this filter. */ - struct amp_filter_args_info *conf; /** Amplification factor. */ unsigned amp; }; @@ -53,14 +52,14 @@ err: static void amp_open(struct filter_node *fn) { struct private_amp_data *pad = para_calloc(sizeof(*pad)); + struct amp_filter_args_info *conf = fn->conf; - pad->conf = fn->conf; fn->private_data = pad; fn->min_iqs = 2; - if (!pad->conf->amp_given && stat_item_values[SI_AMPLIFICATION]) + if (!conf->amp_given && stat_item_values[SI_AMPLIFICATION]) sscanf(stat_item_values[SI_AMPLIFICATION], "%u", &pad->amp); else - pad->amp = pad->conf->amp_arg; + pad->amp = conf->amp_arg; PARA_NOTICE_LOG("amplification: %u (scaling factor: %1.2f)\n", pad->amp, pad->amp / 64.0 + 1.0); } -- 2.30.2