[hackers] [farbfeld] Fix 2 little things in jpg2ff(1) || FRIGN
commit 4d567caa917deab542225fd548a2673dea42461c
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Fri Mar 4 12:29:29 2016 +0100
Commit: FRIGN <dev_AT_frign.de>
CommitDate: Fri Mar 4 12:30:49 2016 +0100
Fix 2 little things in jpg2ff(1)
- actually print usage when one argument is given
(forgot to incorporate the argv0-change there).
- use fputs instead of fprintf for printing a string
constant.
diff --git a/jpg2ff.c b/jpg2ff.c
index 3140908..dc5b060 100644
--- a/jpg2ff.c
+++ b/jpg2ff.c
_AT_@ -31,7 +31,7 @@ main(int argc, char *argv[])
argv0 = argv[0], argc--, argv++;
- if (argc > 1) {
+ if (argc) {
fprintf(stderr, "usage: %s\n", argv0);
return 1;
}
_AT_@ -65,7 +65,7 @@ main(int argc, char *argv[])
}
/* write header */
- fprintf(stdout, "farbfeld");
+ fputs("farbfeld", stdout);
tmp32 = htonl(width);
if (fwrite(&tmp32, sizeof(uint32_t), 1, stdout) != 1)
goto writerr;
Received on Fri Mar 04 2016 - 12:32:32 CET
This archive was generated by hypermail 2.3.0
: Fri Mar 04 2016 - 12:36:17 CET