From deec79ce61b8661d3ad76f3ecc10a80d1ce19cdd Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 9 Apr 2017 17:33:31 +0200 Subject: Clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-next-frame.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/blind-next-frame.c') diff --git a/src/blind-next-frame.c b/src/blind-next-frame.c index 41ab0ca..14d2326 100644 --- a/src/blind-next-frame.c +++ b/src/blind-next-frame.c @@ -22,6 +22,8 @@ main(int argc, char *argv[]) case 'f': stream.frames = etozu_flag('f', UARGF(), 1, SIZE_MAX); break; + default: + usage(); } ARGEND; if (argc < 3) @@ -52,10 +54,8 @@ main(int argc, char *argv[]) enfflush(2, stdout, ""); w = stream.width * stream.pixel_size; - while (stream.frames) { - stream.frames--; - for (h = stream.height; h;) { - h--; + for (; stream.frames; stream.frames--) { + for (h = stream.height; h; h--) { for (n = w; n; n -= stream.ptr) { stream.ptr = 0; if (!enread_stream(2, &stream, n)) @@ -67,7 +67,7 @@ main(int argc, char *argv[]) } done: - if (anything && (h || n || stream.frames)) + if (anything && stream.frames) enprintf(2, "%s: is shorted than expected\n", stream.file); return !anything; -- cgit v1.2.3-70-g09d2