diff options
author | Jefferson Delfes <jefferson.delfes@openbossa.org> | 2013-04-17 10:03:04 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-24 16:59:14 +0300 |
commit | 9b90cc2eed7fcb03d5b3a08de7d80702814d25c4 (patch) | |
tree | 426c699c5aefe6d1ed9f6cee141bd2e43337fc0f /attrib | |
parent | 2c418e989829a2d24a0f4ef618f25ac38939e0fe (diff) | |
download | bluez-9b90cc2eed7fcb03d5b3a08de7d80702814d25c4.tar.gz |
attrib: Simplify boolean tests
Remove unnecessary TRUE/FALSE in boolean tests.
Diffstat (limited to 'attrib')
-rw-r--r-- | attrib/gattrib.c | 4 | ||||
-rw-r--r-- | attrib/gatttool.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/attrib/gattrib.c b/attrib/gattrib.c index e6d602250..416d17bd0 100644 --- a/attrib/gattrib.c +++ b/attrib/gattrib.c @@ -371,7 +371,7 @@ static gboolean match_event(struct event *evt, const uint8_t *pdu, gsize len) if (evt->expected == GATTRIB_ALL_EVENTS) return TRUE; - if (is_response(pdu[0]) == FALSE && evt->expected == GATTRIB_ALL_REQS) + if (!is_response(pdu[0]) && evt->expected == GATTRIB_ALL_REQS) return TRUE; if (evt->expected == pdu[0] && evt->handle == GATTRIB_ALL_HANDLES) @@ -421,7 +421,7 @@ static gboolean received_data(GIOChannel *io, GIOCondition cond, gpointer data) evt->func(buf, len, evt->user_data); } - if (is_response(buf[0]) == FALSE) + if (!is_response(buf[0])) return TRUE; if (attrib->timeout_watch > 0) { diff --git a/attrib/gatttool.c b/attrib/gatttool.c index e1d8407ba..dd0f1e270 100644 --- a/attrib/gatttool.c +++ b/attrib/gatttool.c @@ -248,7 +248,7 @@ static void char_read_cb(guint8 status, const guint8 *pdu, guint16 plen, g_print("\n"); done: - if (opt_listen == FALSE) + if (!opt_listen) g_main_loop_quit(event_loop); } @@ -378,7 +378,7 @@ static void char_write_req_cb(guint8 status, const guint8 *pdu, guint16 plen, g_print("Characteristic value was written successfully\n"); done: - if (opt_listen == FALSE) + if (!opt_listen) g_main_loop_quit(event_loop); } @@ -452,7 +452,7 @@ static void char_desc_cb(guint8 status, const guint8 *pdu, guint16 plen, att_data_list_free(list); done: - if (opt_listen == FALSE) + if (!opt_listen) g_main_loop_quit(event_loop); } @@ -573,7 +573,7 @@ int main(int argc, char *argv[]) g_option_context_add_group(context, char_rw_group); g_option_group_add_entries(char_rw_group, char_rw_options); - if (g_option_context_parse(context, &argc, &argv, &gerr) == FALSE) { + if (!g_option_context_parse(context, &argc, &argv, &gerr)) { g_printerr("%s\n", gerr->message); g_clear_error(&gerr); } |