From 1a912cc13d1870ad8e9232d800cc0f681bee8526 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 15 Jun 2010 08:21:13 +0300 Subject: [PATCH] obexd: Cleanup coding style to be more readable --- obexd/plugins/phonebook-tracker.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c index 0f5bce533..243be51d7 100644 --- a/obexd/plugins/phonebook-tracker.c +++ b/obexd/plugins/phonebook-tracker.c @@ -527,12 +527,12 @@ static void set_call_type(struct phonebook_contact *contact, sent = g_str_equal(is_sent, "true"); answered = g_str_equal(is_answered, "true"); - if (sent == FALSE) + if (sent == FALSE) { if (answered == FALSE) contact->calltype = CALL_TYPE_MISSED; else contact->calltype = CALL_TYPE_INCOMING; - else + } else contact->calltype = CALL_TYPE_OUTGOING; /* Tracker gives time in the ISO 8601 format, UTC time */ @@ -558,12 +558,13 @@ static void pull_contacts(char **reply, int num_fields, void *user_data) goto add_entry; /* Last four fields are always present, ignoring them */ - for (i = 0; i < num_fields - 4; i++) + for (i = 0; i < num_fields - 4; i++) { if (reply[i][0] != '\0') break; + } - if (i == num_fields - 4 && g_str_equal(reply[19], - TRACKER_DEFAULT_CONTACT_ME) == FALSE) + if (i == num_fields - 4 && + !g_str_equal(reply[19], TRACKER_DEFAULT_CONTACT_ME)) return; data->index++; @@ -637,12 +638,13 @@ static void add_to_cache(char **reply, int num_fields, void *user_data) goto done; /* the first element is the URI, always not empty */ - for (i = 1; i < num_fields; i++) + for (i = 1; i < num_fields; i++) { if (reply[i][0] != '\0') break; + } - if (i == num_fields && g_str_equal(reply[0], - TRACKER_DEFAULT_CONTACT_ME) == FALSE) + if (i == num_fields && + !g_str_equal(reply[0], TRACKER_DEFAULT_CONTACT_ME)) return; if (i == 6) -- 2.47.3