diff options
author | Laslo Hunhold <dev@frign.de> | 2017-04-13 00:07:10 +0200 |
---|---|---|
committer | Laslo Hunhold <dev@frign.de> | 2017-04-13 00:07:10 +0200 |
commit | 17f09e2cea4dda0f54841f7a273e347b53f4996e (patch) | |
tree | ef8083df2105f8ed06b79f281316b537e836764b /png2ff.c | |
parent | bc03439e0e0c439bb9c6c3167d9c272f3b7d5632 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -107,5 +107,5 @@ main(int argc, char *argv[]) /* clean up */ png_destroy_read_struct(&pngs, &pngi, NULL); - return 0; + return fshut(stdout, "<stdout>"); } |