From: Anderson Lizardo <anderson.lizardo@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Cc: Anderson Lizardo <anderson.lizardo@openbossa.org>
Subject: [PATCH 3/5] Remove unnecessary assignment from attrib_db_update()
Date: Wed, 16 Mar 2011 16:30:14 -0400 [thread overview]
Message-ID: <1300307416-29909-4-git-send-email-anderson.lizardo@openbossa.org> (raw)
In-Reply-To: <1300307416-29909-1-git-send-email-anderson.lizardo@openbossa.org>
attrib_db_update() uses g_try_realloc() only to expand/shrink space for
the variable "data" field. Therefore existing fields (like handle) are
guaranteed to remain unchanged.
---
src/attrib-server.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/attrib-server.c b/src/attrib-server.c
index 98b3fa3..e705310 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -1249,7 +1249,6 @@ int attrib_db_update(uint16_t handle, bt_uuid_t *uuid, const uint8_t *value,
return -ENOMEM;
l->data = a;
- a->handle = handle;
if (uuid != NULL)
memcpy(&a->uuid, uuid, sizeof(bt_uuid_t));
a->len = len;
--
1.7.0.4
next prev parent reply other threads:[~2011-03-16 20:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 20:30 [PATCH 0/5] Attribute server API fixes Anderson Lizardo
2011-03-16 20:30 ` [PATCH 1/5] Add DBG() calls to attrib_db_* functions Anderson Lizardo
2011-03-16 20:30 ` [PATCH 2/5] Allow NULL pointer as UUID for attrib_db_update() Anderson Lizardo
2011-03-16 20:30 ` Anderson Lizardo [this message]
2011-03-16 20:30 ` [PATCH 4/5] Change attrib_db_update() to return reallocated data Anderson Lizardo
2011-03-16 20:30 ` [PATCH 5/5] Check for existing handle in attrib_db_add() Anderson Lizardo
2011-03-17 12:58 ` [PATCH 0/5] Attribute server API fixes Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300307416-29909-4-git-send-email-anderson.lizardo@openbossa.org \
--to=anderson.lizardo@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox