summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2013-10-30 09:51:26 +0000
committerRichard Hughes <richard@hughsie.com>2013-10-30 09:51:29 +0000
commit705ed47c5c420a7ede9e4c678c6200906a04422a (patch)
treedf09f1b13bbf840dfcea42f2a07220c0c67c6bbc
parent68b34cd7b27d459555b5dc5bc4c0f471b65cd8ba (diff)
downloadcolord-705ed47c5c420a7ede9e4c678c6200906a04422a.tar.gz
trivial: Fix an impossible-to-hit 'bug' spotted by clang
This is probably impossible to hit, but if we ever call CdInhibit from multiple threads we'll need this check.
-rw-r--r--src/cd-inhibit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cd-inhibit.c b/src/cd-inhibit.c
index bebdf22..414fc91 100644
--- a/src/cd-inhibit.c
+++ b/src/cd-inhibit.c
@@ -144,8 +144,12 @@ cd_inhibit_remove (CdInhibit *inhibit, const gchar *sender, GError **error)
/* remove */
ret = g_ptr_array_remove (inhibit->priv->array, item);
- if (!ret)
+ if (!ret) {
+ g_set_error (error, 1, 0,
+ "cannot remove inhibit item for %s",
+ sender);
goto out;
+ }
/* emit signal */
g_debug ("CdInhibit: emit changed");