summaryrefslogtreecommitdiff
path: root/png2ff.c
diff options
context:
space:
mode:
authorLaslo Hunhold <dev@frign.de>2017-04-13 00:07:10 +0200
committerLaslo Hunhold <dev@frign.de>2017-04-13 00:07:10 +0200
commit17f09e2cea4dda0f54841f7a273e347b53f4996e (patch)
treeef8083df2105f8ed06b79f281316b537e836764b /png2ff.c
parentbc03439e0e0c439bb9c6c3167d9c272f3b7d5632 (diff)
Use fshut() to properly flush the output stream
For small images, it could happen that the output stream would not be flushed before exit(), resulting in a lack of error-reporting on a full device. Using fflush(), a function I first introduced in sbase, we do the flushing before returning manually and report errors if they occurred.
Diffstat (limited to 'png2ff.c')
-rw-r--r--png2ff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/png2ff.c b/png2ff.c
index dd9073c..d76d707 100644
--- a/png2ff.c
+++ b/png2ff.c
@@ -107,5 +107,5 @@ main(int argc, char *argv[])
/* clean up */
png_destroy_read_struct(&pngs, &pngi, NULL);
- return 0;
+ return fshut(stdout, "<stdout>");
}