diff options
author | Anderson Lizardo <anderson.lizardo@openbossa.org> | 2011-09-20 22:49:11 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2011-09-22 20:01:30 +0900 |
commit | 71d994a1290d5526d01fd66b90a12bc327bfce17 (patch) | |
tree | ec23f8fe8d58c60f04a9f28e6799f6db08209fc9 /lib/uuid.c | |
parent | 2acb6b1a3ae530f6b952488bca1d5500fe2ea035 (diff) | |
download | bluez-71d994a1290d5526d01fd66b90a12bc327bfce17.tar.gz |
Refactor value assignments of bt_uuid_t variables
Prior to this commit, the assignments were made with memcpy(). This can
be unsafe and less readable, therefore it was replaced with code like:
<dst> = *src;
This also allows more compiler safety checks.
Diffstat (limited to 'lib/uuid.c')
-rw-r--r-- | lib/uuid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/uuid.c b/lib/uuid.c index 325016aab..a3e2a1ad8 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -74,7 +74,7 @@ void bt_uuid_to_uuid128(const bt_uuid_t *src, bt_uuid_t *dst) { switch (src->type) { case BT_UUID128: - memcpy(dst, src, sizeof(bt_uuid_t)); + *dst = *src; break; case BT_UUID32: bt_uuid32_to_uuid128(src, dst); |