Parent: fcd0c0c4cfac3fb3276f1019dfb70046573ec153
Author: João Paulo Rechi Vita <jprvita@openbossa.org>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2012-09-07 13:20:05
Tree: 7bfbee8541f37872af6aec0bf0ba20e6e9283a05
core: Add compare function for bdaddr in a struct btd_device This is a utility function similar to device_address_cmp but comparing bdaddr instead of the string representing the address. This way is possible to avoid allocating two buffers to temporarily hold the strings, two sprintf() calls to generate the strings from the bdaddr arrays, and a string comparison, substituting all of it for one memcmp() call.
Diffstat
| M | src/device.c | | | 5 | +++++ |
| M | src/device.h | | | 1 | + |
2 files changed, 6 insertions(+), 0 deletions(-)