summaryrefslogtreecommitdiff
path: root/ff2png.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 /ff2png.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 'ff2png.c')
-rw-r--r--ff2png.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ff2png.c b/ff2png.c
index a00e257..58b3d37 100644
--- a/ff2png.c
+++ b/ff2png.c
@@ -83,5 +83,5 @@ main(int argc, char *argv[])
png_write_end(pngs, NULL);
png_destroy_write_struct(&pngs, NULL);
- return 0;
+ return fshut(stdout, "<stdout>");
}