summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-11-30 17:17:23 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-11-30 17:17:23 +0100
commitda9b2bb915fb926d936b54ce1809c9b196ce5fc6 (patch)
tree58138c92da72beabc106b63bc7453e9edf40936f /src
parent74dae72b8196c8e31318569f659b0b3de21c83c3 (diff)
Fix some more misusage of "return -err;"
Diffstat (limited to 'src')
-rw-r--r--src/dbus-hci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 912ed532..0ea3ad1e 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -1258,10 +1258,10 @@ int set_service_classes(int dd, const uint8_t *cls, uint8_t value)
dev_class = (value << 16) | (cls[1] << 8) | cls[0];
if (hci_write_class_of_dev(dd, dev_class, HCI_REQ_TIMEOUT) < 0) {
- int err = errno;
+ int err = -errno;
error("Can't write class of device: %s (%d)",
strerror(err), err);
- return -err;
+ return err;
}
return 0;
@@ -1276,10 +1276,10 @@ int set_major_and_minor_class(int dd, const uint8_t *cls,
((major & 0xdf) << 8) | minor;
if (hci_write_class_of_dev(dd, dev_class, HCI_REQ_TIMEOUT) < 0) {
- int err = errno;
+ int err = -errno;
error("Can't write class of device: %s (%d)",
strerror(err), err);
- return -err;
+ return err;
}
return 0;