diff options
author | Peter Hatina <phatina@redhat.com> | 2015-03-12 11:33:30 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-03-12 11:33:30 +0100 |
commit | 7ff286b3cce9d084e54c6461bf39b38f00982d42 (patch) | |
tree | be3a3bca42fbec08cae82e706764e058e8388d98 | |
parent | 2fd82fe020d500152c3a3d5808b2993036b33433 (diff) | |
download | udisks-7ff286b3cce9d084e54c6461bf39b38f00982d42.tar.gz |
Fix udisks_daemon_util_file_set_contents() return value handling
udisks_daemon_util_file_set_contents() returns a gboolean, so just check it as
boolean. The previous (!ret != 0) was utter bogus.
https://bugs.freedesktop.org/show_bug.cgi?id=89556
-rw-r--r-- | src/udiskslinuxblock.c | 4 | ||||
-rw-r--r-- | src/udiskslinuxdrive.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c index c8a86f1..9443e17 100644 --- a/src/udiskslinuxblock.c +++ b/src/udiskslinuxblock.c @@ -1278,7 +1278,7 @@ add_remove_fstab_entry (GVariant *remove, str->str, -1, 0644, /* mode to use if non-existant */ - error) != 0) + error)) goto out; ret = TRUE; @@ -1522,7 +1522,7 @@ add_remove_crypttab_entry (GVariant *remove, str->str, -1, 0600, /* mode to use if non-existant */ - error) != 0) + error)) goto out; ret = TRUE; diff --git a/src/udiskslinuxdrive.c b/src/udiskslinuxdrive.c index 5a85fb3..b84204c 100644 --- a/src/udiskslinuxdrive.c +++ b/src/udiskslinuxdrive.c @@ -1180,7 +1180,7 @@ handle_set_configuration (UDisksDrive *_drive, data, data_len, 0600, /* mode to use if non-existant */ - &error) != 0) + &error)) { g_dbus_method_invocation_take_error (invocation, error); goto out; |