summaryrefslogtreecommitdiff
path: root/src/eir.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-01-17 12:48:09 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2014-01-17 13:47:00 +0200
commit56a68cd05b16a6820057f996e2b837390f8ae40b (patch)
tree8f152e132e82b1d1958ee5484abbe40916e97276 /src/eir.c
parentc2dfa9289248530ef66b183b58015fe3fc4f827c (diff)
downloadbluez-56a68cd05b16a6820057f996e2b837390f8ae40b.tar.gz
eir: Prefer bool over gboolean
Diffstat (limited to 'src/eir.c')
-rw-r--r--src/eir.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/eir.c b/src/eir.c
index 7745ff397..5f3f05976 100644
--- a/src/eir.c
+++ b/src/eir.c
@@ -30,6 +30,7 @@
#include <ctype.h>
#include <stdlib.h>
#include <stdint.h>
+#include <stdbool.h>
#include <glib.h>
#include <bluetooth/bluetooth.h>
@@ -259,7 +260,7 @@ static void eir_generate_uuid128(sdp_list_t *list, uint8_t *ptr,
int i, k, uuid_count = 0;
uint16_t len = *eir_len;
uint8_t *uuid128;
- gboolean truncated = FALSE;
+ bool truncated = false;
/* Store UUIDs in place, skip 2 bytes to write type and length later */
uuid128 = ptr + 2;
@@ -274,7 +275,7 @@ static void eir_generate_uuid128(sdp_list_t *list, uint8_t *ptr,
/* Stop if not enough space to put next UUID128 */
if ((len + 2 + SIZEOF_UUID128) > HCI_MAX_EIR_LENGTH) {
- truncated = TRUE;
+ truncated = true;
break;
}
@@ -323,7 +324,7 @@ int eir_create_oob(const bdaddr_t *addr, const char *name, uint32_t cod,
uint16_t eir_total_len;
uint16_t uuid16[HCI_MAX_EIR_LENGTH / 2];
int i, uuid_count = 0;
- gboolean truncated = FALSE;
+ bool truncated = false;
size_t name_len;
eir_total_len = sizeof(uint16_t) + sizeof(bdaddr_t);
@@ -418,7 +419,7 @@ int eir_create_oob(const bdaddr_t *addr, const char *name, uint32_t cod,
/* Stop if not enough space to put next UUID16 */
if ((eir_optional_len + 2 + sizeof(uint16_t)) >
HCI_MAX_EIR_LENGTH) {
- truncated = TRUE;
+ truncated = true;
break;
}