- if (!result)
- break;
-
- if (result < 0)
- state->lasterror = "Corrupt or missing data, continuing...";
- else {
- /* Don't bother going through the rest, we can just
- * write the page out now
- */
- tmp = fwrite (ogout.header, 1, ogout.header_len, out);
- if (tmp != (size_t) ogout.header_len)
- goto cleanup;
+ /* Don't bother going through the rest, we can just
+ * write the page out now
+ */
+ if (!write_data (ogout.header, 1, ogout.header_len, out))
+ goto cleanup;