diff --git a/examples/universal.c b/examples/universal.c index 0f85592..51d1044 100644 --- a/examples/universal.c +++ b/examples/universal.c @@ -727,6 +727,10 @@ dowork (dc_context_t *context, dc_descriptor_t *descriptor, const char *devname, // Open the output file. divedata.fp = fopen (xmlfile, "w"); + if (divedata.fp) { + fprintf (divedata.fp, "\n"); + } + // Download the dives. message ("Downloading the dives.\n"); rc = dc_device_foreach (device, dive_cb, &divedata); @@ -738,6 +742,10 @@ dowork (dc_context_t *context, dc_descriptor_t *descriptor, const char *devname, return rc; } + if (divedata.fp) { + fprintf (divedata.fp, "\n"); + } + // Store the fingerprint data. if (g_cachedir) { fpwrite (divedata.fingerprint, g_cachedir, dc_device_get_type (device), devdata.devinfo.serial);