From: Jefferson Delfes <jefferson.delfes@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Cc: Jefferson Delfes <jefferson.delfes@openbossa.org>
Subject: [PATCH BlueZ 06/16] attrib: Change g_attrib_set_destroy_function return type
Date: Thu, 28 Mar 2013 11:39:10 -0400 [thread overview]
Message-ID: <1364485160-22720-7-git-send-email-jefferson.delfes@openbossa.org> (raw)
In-Reply-To: <1364485160-22720-1-git-send-email-jefferson.delfes@openbossa.org>
The return type from g_attrib_set_destroy_function don't need to be
gboolean, it can be standard bool type.
That change implies change in its signature, which requires stdbool.h to
be included where attrib/gattrib.h is included.
---
attrib/gatt.c | 1 +
attrib/gattrib.c | 8 ++++----
attrib/gattrib.h | 4 ++--
attrib/gatttool.c | 1 +
attrib/interactive.c | 1 +
attrib/utils.c | 1 +
6 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/attrib/gatt.c b/attrib/gatt.c
index a7cb8f7..5e7d22a 100644
--- a/attrib/gatt.c
+++ b/attrib/gatt.c
@@ -28,6 +28,7 @@
#include <stdint.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <glib.h>
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
diff --git a/attrib/gattrib.c b/attrib/gattrib.c
index c59d5f5..e9a4557 100644
--- a/attrib/gattrib.c
+++ b/attrib/gattrib.c
@@ -243,16 +243,16 @@ GIOChannel *g_attrib_get_channel(GAttrib *attrib)
return attrib->io;
}
-gboolean g_attrib_set_destroy_function(GAttrib *attrib,
- GDestroyNotify destroy, gpointer user_data)
+bool g_attrib_set_destroy_function(GAttrib *attrib, GDestroyNotify destroy,
+ gpointer user_data)
{
if (attrib == NULL)
- return FALSE;
+ return false;
attrib->destroy = destroy;
attrib->destroy_user_data = user_data;
- return TRUE;
+ return true;
}
static gboolean disconnect_timeout(gpointer data)
diff --git a/attrib/gattrib.h b/attrib/gattrib.h
index 3fe92c7..9d6a1c2 100644
--- a/attrib/gattrib.h
+++ b/attrib/gattrib.h
@@ -48,8 +48,8 @@ void g_attrib_unref(GAttrib *attrib);
GIOChannel *g_attrib_get_channel(GAttrib *attrib);
-gboolean g_attrib_set_destroy_function(GAttrib *attrib,
- GDestroyNotify destroy, gpointer user_data);
+bool g_attrib_set_destroy_function(GAttrib *attrib, GDestroyNotify destroy,
+ gpointer user_data);
guint g_attrib_send(GAttrib *attrib, guint id, const guint8 *pdu, guint16 len,
GAttribResultFunc func, gpointer user_data,
diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 6525ebc..44c9ccf 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
@@ -29,6 +29,7 @@
#include <errno.h>
#include <glib.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <unistd.h>
#include <bluetooth/bluetooth.h>
diff --git a/attrib/interactive.c b/attrib/interactive.c
index a99ad0a..d6fc89c 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <errno.h>
#include <stdio.h>
#include <glib.h>
diff --git a/attrib/utils.c b/attrib/utils.c
index f9813d1..1490381 100644
--- a/attrib/utils.c
+++ b/attrib/utils.c
@@ -26,6 +26,7 @@
#endif
#include <stdlib.h>
+#include <stdbool.h>
#include <glib.h>
#include <bluetooth/bluetooth.h>
--
1.8.2
next prev parent reply other threads:[~2013-03-28 15:39 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 15:39 [PATCH BlueZ 00/16] attrib: Replace GLib basic data types usage Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 01/16] attrib: Simplify boolean tests Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 02/16] attrib: Change GAttrib->stale type from gboolean Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 03/16] attrib: Change command->sent " Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 04/16] attrib: Change is_response return " Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 05/16] attrib: Change match_event " Jefferson Delfes
2013-03-28 15:39 ` Jefferson Delfes [this message]
2013-03-28 15:39 ` [PATCH BlueZ 07/16] attrib: Change g_attrib_cancel/_all return type Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 08/16] attrib: Change g_attrib_unregister/_all " Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 09/16] attrib: Change g_attrib_set_debug return type from gboolean Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 10/16] attrib: Change g_attrib_set_mtu " Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 11/16] attrib: Change g_attrib_is_encrypted " Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 12/16] attrib: Change command->opcode type from guint8 Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 13/16] attrib: Change event->handle type from guint16 Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 14/16] attrib: Change command->id type from guint Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 15/16] attrib: Change event->id " Jefferson Delfes
2013-03-28 15:39 ` [PATCH BlueZ 16/16] attrib: Change command->pdu pointer type from guint8 Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 00/16] attrib: Replace GLib basic data types usage Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 01/16] attrib: Simplify boolean tests Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 02/16] attrib: Change GAttrib->stale type from gboolean Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 03/16] attrib: Change command->sent " Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 04/16] attrib: Change is_response return " Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 05/16] attrib: Change match_event " Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 06/16] attrib: Change g_attrib_set_destroy_function return type Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 07/16] attrib: Change g_attrib_cancel/_all " Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 08/16] attrib: Change g_attrib_unregister/_all " Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 09/16] attrib: Change g_attrib_set_debug return type from gboolean Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 10/16] attrib: Change g_attrib_set_mtu " Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 11/16] attrib: Change g_attrib_is_encrypted " Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 12/16] attrib: Change command->opcode type from guint8 Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 13/16] attrib: Change event->handle type from guint16 Jefferson Delfes
2013-04-10 19:16 ` [PATCH BlueZ v2 14/16] attrib: Change command->id type from guint Jefferson Delfes
2013-04-10 19:17 ` [PATCH BlueZ v2 15/16] attrib: Change event->id " Jefferson Delfes
2013-04-10 19:17 ` [PATCH BlueZ v2 16/16] attrib: Change command->pdu pointer type from guint8 Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 00/16] attrib: Replace GLib basic data types usage Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 01/16] attrib: Simplify boolean tests Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 02/16] attrib: Change GAttrib->stale type from gboolean Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 03/16] attrib: Change command->sent " Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 04/16] attrib: Change is_response return " Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 05/16] attrib: Change match_event " Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 06/16] attrib: Change g_attrib_set_destroy_function return type Jefferson Delfes
2013-04-24 14:02 ` Johan Hedberg
2013-05-02 16:05 ` Marcel Holtmann
2013-04-17 14:03 ` [PATCH BlueZ v3 07/16] attrib: Change g_attrib_cancel/_all " Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 08/16] attrib: Change g_attrib_unregister/_all " Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 09/16] attrib: Change g_attrib_set_debug return type from gboolean Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 10/16] attrib: Change g_attrib_set_mtu " Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 11/16] attrib: Change g_attrib_is_encrypted " Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 12/16] attrib: Change command->opcode type from guint8 Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 13/16] attrib: Change event->handle type from guint16 Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 14/16] attrib: Change command->id type from guint Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 15/16] attrib: Change event->id " Jefferson Delfes
2013-04-17 14:03 ` [PATCH BlueZ v3 16/16] attrib: Change command->pdu pointer type from guint8 Jefferson Delfes
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=1364485160-22720-7-git-send-email-jefferson.delfes@openbossa.org \
--to=jefferson.delfes@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