From b3ef9c392e9487eca373366f265c2b86f4d3f30b Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 26 Jan 2023 16:11:02 +0100 Subject: [PATCH] MINOR: bwlim: Remove useless test on CF_READ_ERROR to detect the last packet There is already a test on CF_EOI and CF_SHUTR. The last one is always set when a read error is reported. Thus there is no reason to check CF_READ_ERROR. --- src/flt_bwlim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flt_bwlim.c b/src/flt_bwlim.c index 136be5c2d..20919fcd1 100644 --- a/src/flt_bwlim.c +++ b/src/flt_bwlim.c @@ -151,7 +151,7 @@ static int bwlim_apply_limit(struct filter *filter, struct channel *chn, unsigne */ ret = tokens; if (tokens < conf->min_size) { - ret = (chn->flags & (CF_EOI|CF_SHUTR|CF_READ_ERROR)) + ret = (chn->flags & (CF_EOI|CF_SHUTR)) ? MIN(len, conf->min_size) : conf->min_size;