changeset 789:8b727fa3f529

Cleanup.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 06 Aug 2013 14:59:44 +0300
parents e15e0469499a
children cb15452f738d
files dmfile.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dmfile.c	Tue Jul 30 15:29:19 2013 +0300
+++ b/dmfile.c	Tue Aug 06 14:59:44 2013 +0300
@@ -51,9 +51,7 @@
 #define DM_DEFINE_FFUNC(xname, xtype, xmacro)         \
 BOOL dm_fwrite_ ## xname (FILE *f, const xtype v) {   \
     xtype result = DM_NATIVE_TO_ ## xmacro (v);       \
-    if (fwrite(&result, sizeof( xtype ), 1, f) != 1)  \
-        return FALSE;                                 \
-    return TRUE;                                      \
+    return fwrite(&result, sizeof( xtype ), 1, f) == 1;  \
 }
 
 #include "dmfiletmpl.h"