aboutsummaryrefslogtreecommitdiffstats
path: root/thermometer
diff options
context:
space:
mode:
authorSantiago Carot-Nemesio <sancane@gmail.com>2011-10-31 14:16:05 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2011-11-01 10:12:35 +0200
commitb3cf3d6d1b9d1293bfe99c1aeb698337e65a3c34 (patch)
treedf1f87b4883be247437b8f0eefcb45cf17e4b539 /thermometer
parent4f89d2634b820402d0cdd703a2f45d4af7b3322d (diff)
downloadbluez-b3cf3d6d1b9d1293bfe99c1aeb698337e65a3c34.tar.gz
bluez-b3cf3d6d1b9d1293bfe99c1aeb698337e65a3c34.tar.xz
bluez-b3cf3d6d1b9d1293bfe99c1aeb698337e65a3c34.zip
Remove unnecessary casting in thermometer plugin
Diffstat (limited to 'thermometer')
-rw-r--r--thermometer/thermometer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c
index 0d851027..8f0a5ea6 100644
--- a/thermometer/thermometer.c
+++ b/thermometer/thermometer.c
@@ -200,7 +200,7 @@ static void read_interval_cb(guint8 status, const guint8 *pdu, guint16 len,
{
struct characteristic *ch = user_data;
uint8_t value[ATT_MAX_MTU];
- uint16_t *p, interval;
+ uint16_t interval;
int vlen;
if (status != 0) {
@@ -219,9 +219,7 @@ static void read_interval_cb(guint8 status, const guint8 *pdu, guint16 len,
return;
}
- p = (uint16_t *) value;
- interval = btohs(bt_get_unaligned(p));
-
+ interval = att_get_u16(&value[0]);
change_property(ch->t, "Interval", &interval);
}