summaryrefslogtreecommitdiff
path: root/src/lib/config.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/config.cc')
-rw-r--r--src/lib/config.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 172890dcf..eb2671365 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -987,11 +987,7 @@ Config::write_config () const
if (!f) {
throw FileError (_("Could not open file for writing"), cf);
}
- size_t const w = fwrite (s.c_str(), 1, s.length(), f);
- if (w != s.length()) {
- fclose (f);
- throw FileError (_("Could not write whole file"), cf);
- }
+ checked_fwrite (s.c_str(), s.length(), f, cf);
fclose (f);
} catch (xmlpp::exception& e) {
string s = e.what ();