diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-07-29 20:31:07 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-07-29 20:31:07 +0200 |
commit | dacd6cee76a08331b8c8616c5f30f70ee49aa2f9 (patch) | |
tree | 7a7d73f2ac1f909255361781ca923365b6c9b7c3 /src/libsystemd/sd-device/device-private.c | |
parent | 8388607b5851574e50a6e65db98135b793b08910 (diff) |
tree-wide: port everything over to fflush_and_check()
Some places invoked fflush() directly with their own manual error
checking, let's unify all that by using fflush_and_check().
This also unifies the general error paths of fflush()+rename() file
writers.
Diffstat (limited to 'src/libsystemd/sd-device/device-private.c')
-rw-r--r-- | src/libsystemd/sd-device/device-private.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/sd-device/device-private.c index 2e60433246..0ec9667744 100644 --- a/src/libsystemd/sd-device/device-private.c +++ b/src/libsystemd/sd-device/device-private.c @@ -1082,12 +1082,10 @@ int device_update_db(sd_device *device) { return 0; fail: - log_error_errno(r, "failed to create %s file '%s' for '%s'", has_info ? "db" : "empty", - path, device->devpath); - unlink(path); - unlink(path_tmp); + (void) unlink(path); + (void) unlink(path_tmp); - return r; + return log_error_errno(r, "failed to create %s file '%s' for '%s'", has_info ? "db" : "empty", path, device->devpath); } int device_delete_db(sd_device *device) { |