changeset 1695:ce3e56cfa9b9

Improve error checking in dmWriteDataFile().
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 05 Jun 2018 11:07:44 +0300
parents e568535e1a96
children cf0fddd4bf52
files src/dmfile.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmfile.c	Tue Jun 05 11:03:17 2018 +0300
+++ b/src/dmfile.c	Tue Jun 05 11:07:44 2018 +0300
@@ -78,7 +78,7 @@
         goto error;
     }
 
-    if (fwrite(buf, bufSize, 1, fh) != 1)
+    if (fwrite(buf, 1, bufSize, fh) != bufSize)
     {
         res = dmGetErrno();
         dmError(res,