X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=amp_filter.c;h=a62344a1520798787f5698b89db7ec085776ef2e;hp=f6e22059e3f2432a2c1c69751415e789569b4fe7;hb=8b0ab0837ecdd5d28c7b6f31a605552f6942ca64;hpb=6442f07bb08eb6e557086587f997b1785ea18ef7 diff --git a/amp_filter.c b/amp_filter.c index f6e22059..a62344a1 100644 --- a/amp_filter.c +++ b/amp_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Andre Noll + * Copyright (C) 2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -76,11 +76,9 @@ static void amp_open(struct filter_node *fn) pad->conf = fn->conf; fn->private_data = pad; - if (!pad->conf->amp_given && stat_item_values[SI_AMPLIFICATION]) { - int i = SI_AMPLIFICATION; - char *s = stat_item_values[i] + strlen(status_item_list[i]) + 1; - sscanf(s, "%u", &pad->amp); - } else + if (!pad->conf->amp_given && stat_item_values[SI_AMPLIFICATION]) + sscanf(stat_item_values[SI_AMPLIFICATION], "%u", &pad->amp); + else pad->amp = pad->conf->amp_arg; fn->bufsize = AMP_CHUNK_SIZE; fn->buf = para_malloc(fn->bufsize); @@ -101,8 +99,6 @@ void amp_filter_init(struct filter *f) f->convert = amp_convert; f->parse_config = amp_parse_config; f->help = (struct ggo_help) { - .purpose = amp_filter_args_info_purpose, - .usage = amp_filter_args_info_usage, .short_help = amp_filter_args_info_help, .detailed_help = amp_filter_args_info_detailed_help };