Change type of command->opcode, command->expected and event->expected for a standard type. --- attrib/gattrib.c | 12 ++++++------ attrib/gattrib.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/attrib/gattrib.c b/attrib/gattrib.c index 521a714..57acb09 100644 --- a/attrib/gattrib.c +++ b/attrib/gattrib.c @@ -62,10 +62,10 @@ struct _GAttrib { struct command { guint id; - guint8 opcode; + uint8_t opcode; guint8 *pdu; guint16 len; - guint8 expected; + uint8_t expected; bool sent; GAttribResultFunc func; gpointer user_data; @@ -74,14 +74,14 @@ struct command { struct event { guint id; - guint8 expected; + uint8_t expected; guint16 handle; GAttribNotifyFunc func; gpointer user_data; GDestroyNotify notify; }; -static guint8 opcode2expected(guint8 opcode) +static uint8_t opcode2expected(uint8_t opcode) { switch (opcode) { case ATT_OP_MTU_REQ: @@ -124,7 +124,7 @@ static guint8 opcode2expected(guint8 opcode) return 0; } -static bool is_response(guint8 opcode) +static bool is_response(uint8_t opcode) { switch (opcode) { case ATT_OP_ERROR: @@ -669,7 +669,7 @@ bool g_attrib_set_mtu(GAttrib *attrib, int mtu) return true; } -guint g_attrib_register(GAttrib *attrib, guint8 opcode, guint16 handle, +guint g_attrib_register(GAttrib *attrib, uint8_t opcode, guint16 handle, GAttribNotifyFunc func, gpointer user_data, GDestroyNotify notify) { diff --git a/attrib/gattrib.h b/attrib/gattrib.h index 03f4911..2cf5b4d 100644 --- a/attrib/gattrib.h +++ b/attrib/gattrib.h @@ -61,7 +61,7 @@ bool g_attrib_cancel_all(GAttrib *attrib); bool g_attrib_set_debug(GAttrib *attrib, GAttribDebugFunc func, gpointer user_data); -guint g_attrib_register(GAttrib *attrib, guint8 opcode, guint16 handle, +guint g_attrib_register(GAttrib *attrib, uint8_t opcode, guint16 handle, GAttribNotifyFunc func, gpointer user_data, GDestroyNotify notify); -- 1.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html