Diff between fc54ed570bdeec2f2a2baf9448af0d4a4a9222ee and c7e99db585010d3b7a4dbc4c2b7c354b2fdef0f3

Changed Files

File Additions Deletions Status
obexd/plugins/phonebook-ebook.c +6 -7 modified

Full Patch

diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c
index 4b933f9..0a47f72 100644
--- a/obexd/plugins/phonebook-ebook.c
+++ b/obexd/plugins/phonebook-ebook.c
@@ -128,7 +128,6 @@ static gchar *evcard_to_string(EVCard *evcard, guint format, guint64 filter)
 	g_object_unref(evcard2);
 
 	return vcard;
-
 }
 
 static void ebookpull_cb(EBook *book, EBookStatus status, GList *contacts,
@@ -170,14 +169,14 @@ static gchar *evcard_name_attribute_to_string(EVCard *evcard)
 		return NULL;
 
 	for (l = e_vcard_attribute_get_values(attrib); l; l = l->next) {
-		if (!name)
-			name = g_string_new(l->data);
-		else {
-			const gchar *value = l->data;
+		const gchar *value = l->data;
 
-			if (!strlen(value))
-				continue;
+		if (!strlen(value))
+			continue;
 
+		if (!name)
+			name = g_string_new(value);
+		else {
 			name = g_string_append(name, ";");
 			name = g_string_append(name, l->data);
 		}