summaryrefslogtreecommitdiff
path: root/jpg2ff.c
diff options
context:
space:
mode:
authorFRIGN <dev@frign.de>2016-03-04 12:29:29 +0100
committerFRIGN <dev@frign.de>2016-03-04 12:30:49 +0100
commit4d567caa917deab542225fd548a2673dea42461c (patch)
tree4316b5cd34795f24ddd35fa14ca6ecf8311ee8bc /jpg2ff.c
parent3122c071397b4db9c9122072c56bd31c02085ca7 (diff)
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.
Diffstat (limited to 'jpg2ff.c')
-rw-r--r--jpg2ff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/jpg2ff.c b/jpg2ff.c
index 3140908..dc5b060 100644
--- a/jpg2ff.c
+++ b/jpg2ff.c
@@ -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;
}
@@ -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;