Skip to content
Snippets Groups Projects
Commit 5a50199e authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#4616] Fix addressbook warnings

parent a7daebf5
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,6 @@ addressbook_is_active() ...@@ -96,7 +96,6 @@ addressbook_is_active()
static void static void
addressbook_config_books() addressbook_config_books()
{ {
gchar **config_book_uid; gchar **config_book_uid;
book_data_t *book_data; book_data_t *book_data;
gchar **list; gchar **list;
...@@ -104,7 +103,8 @@ addressbook_config_books() ...@@ -104,7 +103,8 @@ addressbook_config_books()
// Retrieve list of books // Retrieve list of books
list = (gchar **) dbus_get_addressbook_list(); list = (gchar **) dbus_get_addressbook_list();
if (list) { if (list == NULL)
return;
for (config_book_uid = list; *config_book_uid; config_book_uid++) { for (config_book_uid = list; *config_book_uid; config_book_uid++) {
...@@ -112,8 +112,9 @@ addressbook_config_books() ...@@ -112,8 +112,9 @@ addressbook_config_books()
book_data = books_get_book_data_by_uid (*config_book_uid); book_data = books_get_book_data_by_uid (*config_book_uid);
// If book_data exists // If book_data exists
if (!book_data) { if (book_data == NULL) {
ERROR ("Addressbook: Error: Could not open book (%s:%d)", __FILE__, __LINE__); ERROR ("Addressbook: Error: Could not open book (%s:%d)", __FILE__, __LINE__);
} else {
book_data->active = TRUE; book_data->active = TRUE;
} }
} }
...@@ -121,8 +122,6 @@ addressbook_config_books() ...@@ -121,8 +122,6 @@ addressbook_config_books()
g_strfreev (list); g_strfreev (list);
} }
}
/** /**
* Good method to get books_data * Good method to get books_data
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment