diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2012-12-31 20:16:19 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2012-12-31 20:16:19 +0100 |
| commit | 939408e9c730ceb43d9bfd49056b5eb26f081b26 (patch) | |
| tree | 8e86f02876e00e1776aa321a1d51e64c0fbc58ac | |
| parent | 95b85be502f639fb2080ae92d4d33c013b18aa94 (diff) | |
| download | cataract-939408e9c730ceb43d9bfd49056b5eb26f081b26.tar.xz | |
atom-writer: Check fclose() result
Errors may very well appear on file closing.
TODO: Go through all other file writes and add more checks.
| -rw-r--r-- | src/atom-writer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/atom-writer.c b/src/atom-writer.c index 51609bb..b929310 100644 --- a/src/atom-writer.c +++ b/src/atom-writer.c @@ -205,7 +205,8 @@ atom_writer_write_to_file (TAtomFeed *feed, const gchar *filename, TGallerySetup } fprintf (f, "</feed>\n"); - fclose (f); + if (fclose (f) != 0) + log_error ("Error writing atom feed: %s\n", strerror (errno)); } static void |
