From a6b0b55b7c0790f18fe18971db938df79566ec2f Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Thu, 10 Jun 2010 10:04:40 -0300 Subject: [PATCH] obexd: Fix complex logic discovering the type of call As is_sent and is_answered are never NULL, we can use g_str_equal() and simplify our logic. --- obexd/plugins/phonebook-tracker.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c index 8fb618dea..e38370999 100644 --- a/obexd/plugins/phonebook-tracker.c +++ b/obexd/plugins/phonebook-tracker.c @@ -494,13 +494,8 @@ static void set_call_type(struct phonebook_contact *contact, return; } - sent = FALSE; - if (g_strcmp0(is_sent, "true") == 0) - sent = TRUE; - - answered = FALSE; - if (g_strcmp0(is_answered, "true") == 0) - answered = TRUE; + sent = g_str_equal(is_sent, "true"); + answered = g_str_equal(is_answered, "true"); if (sent == FALSE) if (answered == FALSE) -- 2.47.3