speed improvements
[claws.git] / src / msgcache.c
index 9bdf3a3759e73c03f437d05f46eaa9ca64083657..9ccd7299967e11e8f7de8049856c801032fabe2f 100644 (file)
@@ -311,13 +311,12 @@ void msgcache_read_mark(MsgCache *cache, const gchar *mark_file)
 #define WRITE_CACHE_DATA(data, fp) \
 { \
        gint len; \
- \
-       if (data == NULL || (len = strlen(data)) == 0) { \
+       if (data == NULL) \
                len = 0; \
-               WRITE_CACHE_DATA_INT(len, fp); \
-       } else { \
+       else \
                len = strlen(data); \
-               WRITE_CACHE_DATA_INT(len, fp); \
+       WRITE_CACHE_DATA_INT(len, fp); \
+       if (len > 0) { \
                fwrite(data, len, 1, fp); \
        } \
 }