catpoint

simple slides viewer
git clone git://git.2f30.org/catpoint.git
Log | Files | Refs | README | LICENSE

commit 1d3e7aa314aa826b56fb4dd5855bd892696f03f7
parent 72a22c44dc9027a508ede2a40f9f3d00ce4b2606
Author: FRIGN <dev@frign.de>
Date:   Fri Jul 11 20:08:55 +0200

Be more explicit with the for-loop-arguments

Conflicts:
	catpoint.c

Diffstat:
catpoint.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/catpoint.c b/catpoint.c @@ -32,7 +32,7 @@ main(int argc, char *argv[]) err(1, "malloc"); /* map files to mem */ - for (i = 0; argv[i] != NULL; i++) { + for (i = 0; i < argc; i++) { fd = open(argv[i], O_RDONLY); if (fd == -1) err(1, "open: %s", argv[i]); @@ -88,7 +88,7 @@ again: } /* unmap mem */ - for (i = 0; argv[i] != NULL; i++) + for (i = 0; i < argc; ++i) munmap(s[i].buf, s[i].siz); printf("\e[?25h"); /* unhide cursor */