summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-queue-private.c
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-01-14 12:20:25 -0500
committerAnthony G. Basile <blueness@gentoo.org>2014-01-14 12:20:25 -0500
commitb8ed8b124aaff754e244dff6930b36c192fa69e0 (patch)
treec6d7caf75d42584eaf0227332d6c43ecc76d7565 /src/libudev/libudev-queue-private.c
parentfd98dfdcb889c74c84a00e54e8094f9c91387c6a (diff)
src/libudev: bring in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev/libudev-queue-private.c')
-rw-r--r--src/libudev/libudev-queue-private.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/libudev/libudev-queue-private.c b/src/libudev/libudev-queue-private.c
index 51a1d672be..80d7ceef2b 100644
--- a/src/libudev/libudev-queue-private.c
+++ b/src/libudev/libudev-queue-private.c
@@ -224,8 +224,8 @@ static int rebuild_queue_file(struct udev_queue_export *udev_queue_export)
if (new_queue_file == NULL)
goto error;
seqnum = udev_queue_export->seqnum_max;
- if (fwrite(&seqnum, 1, sizeof(unsigned long long int), new_queue_file) != sizeof(unsigned long long int))
- goto error;
+ fwrite(&seqnum, 1, sizeof(unsigned long long int), new_queue_file);
+
/* copy unfinished events only to the new file */
if (devpaths != NULL) {
for (i = devpaths->devpaths_first; i < devpaths->devpaths_size; i++) {
@@ -239,12 +239,9 @@ static int rebuild_queue_file(struct udev_queue_export *udev_queue_export)
err = udev_queue_read_devpath(udev_queue_export->queue_file, devpath, sizeof(devpath));
devpath_len = err;
- if (fwrite(&seqnum, sizeof(unsigned long long int), 1, new_queue_file) != 1)
- goto error;
- if (fwrite(&devpath_len, sizeof(unsigned short), 1, new_queue_file) != 1)
- goto error;
- if (fwrite(devpath, 1, devpath_len, new_queue_file) != devpath_len)
- goto error;
+ fwrite(&seqnum, sizeof(unsigned long long int), 1, new_queue_file);
+ fwrite(&devpath_len, sizeof(unsigned short), 1, new_queue_file);
+ fwrite(devpath, 1, devpath_len, new_queue_file);
}
seqnum++;
}