From 68276e2672bd2422ea6b4be3af4abfa0f1f7f258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Mon, 5 Apr 2021 19:10:35 +0300 Subject: demux_mf: utilize stdbool bool for if a format specifier was bad It is not an iterator, thus while the ++ is completely correct, it is somewhat weird. --- demux/demux_mf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'demux/demux_mf.c') diff --git a/demux/demux_mf.c b/demux/demux_mf.c index 6a6c8c212a..61d06f2c40 100644 --- a/demux/demux_mf.c +++ b/demux/demux_mf.c @@ -16,6 +16,7 @@ */ #include +#include #include #include #include @@ -153,7 +154,8 @@ static mf_t *open_mf_pattern(void *talloc_ctx, struct demuxer *d, char *filename // simplicity we reject all conversion specifiers except %% and simple // integer specifier: %[.][NUM]d where NUM is 1-3 digits (%.d is valid) const char *f = filename; - int MAXDIGS = 3, nspec = 0, bad_spec = 0, c; + int MAXDIGS = 3, nspec = 0, c; + bool bad_spec = false; while (nspec < 2 && (c = *f++)) { if (c != '%') @@ -177,7 +179,7 @@ static mf_t *open_mf_pattern(void *talloc_ctx, struct demuxer *d, char *filename /* no-op */; if (*f != 'd') { - bad_spec++; // not int, or beyond our validation capacity + bad_spec = true; // not int, or beyond our validation capacity break; } -- cgit v1.2.3