aboutsummaryrefslogtreecommitdiffstats
path: root/src/blind-next-frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blind-next-frame.c')
-rw-r--r--src/blind-next-frame.c10
1 files changed, 5 insertions, 5 deletions
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, "<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;