diff options
author | Anderson Lizardo <anderson.lizardo@openbossa.org> | 2013-07-19 13:34:17 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-07-24 08:44:07 -0700 |
commit | d1abf2b7d89b4c1c92b09d5acd59e7a64af06bbd (patch) | |
tree | f27bdf01cda382e094830df428b5b1b6261e9af6 /attrib | |
parent | 638790716fa36c221f35bd2639754b6d43798741 (diff) | |
download | bluez-d1abf2b7d89b4c1c92b09d5acd59e7a64af06bbd.tar.gz |
attrib: Reduce scope of variable declarations in char_discovered_cb()
This makes it easy to identify where variables are being used.
Diffstat (limited to 'attrib')
-rw-r--r-- | attrib/gatt.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/attrib/gatt.c b/attrib/gatt.c index 90427a9d7..bb2cae137 100644 --- a/attrib/gatt.c +++ b/attrib/gatt.c @@ -447,10 +447,6 @@ static void char_discovered_cb(guint8 status, const guint8 *ipdu, guint16 iplen, struct discover_char *dc = user_data; struct att_data_list *list; unsigned int i, err = ATT_ECODE_ATTR_NOT_FOUND; - size_t buflen; - uint8_t *buf; - guint16 oplen; - bt_uuid_t uuid; uint16_t last = 0; if (status) { @@ -497,6 +493,11 @@ static void char_discovered_cb(guint8 status, const guint8 *ipdu, guint16 iplen, att_data_list_free(list); if (last != 0 && (last + 1 < dc->end)) { + bt_uuid_t uuid; + guint16 oplen; + size_t buflen; + uint8_t *buf; + buf = g_attrib_get_buffer(dc->attrib, &buflen); bt_uuid16_create(&uuid, GATT_CHARAC_UUID); |