From: Tollef Fog Heen Date: Tue, 16 Oct 2007 16:45:14 +0000 (+0200) Subject: Make this compile again X-Git-Tag: 0.1~35 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3a8fe0a5de2cad9c02c8ef0b18071b4ef01e99d;p=eweouz Make this compile again --- diff --git a/src/dump-addressbook.c b/src/dump-addressbook.c index 4943206..a70e2db 100644 --- a/src/dump-addressbook.c +++ b/src/dump-addressbook.c @@ -3,17 +3,15 @@ #include #include -void dump_as_rfc822(EContact *c) +void dump_as_rfc822(EContact *contact) { GList *attrs; int i; - - contact = E_CONTACT(c->data); attrs = e_contact_get_attributes(contact, E_CONTACT_PHONE_MOBILE); printf("\t\tCONTACT: %s\n", e_contact_get(contact, E_CONTACT_FULL_NAME)); if (! attrs) { fprintf(stderr, "Could not get phone attributes for contact\n"); - continue; + return; } for (i = 0; i < g_list_length(attrs); i++) { EVCardAttribute *attr = (EVCardAttribute *) g_list_nth_data(attrs, i); @@ -35,7 +33,8 @@ void dump_as_rfc822(EContact *c) } } -int main(int argc, char **argv) { +int main(int argc, char **argv) +{ EBook *book; ESourceList *source_list; ESourceGroup *group; @@ -43,7 +42,6 @@ int main(int argc, char **argv) { GSList *groups; EBookQuery *query; GList *contacts; - EContact *contact; GSList *sources; GSList *g, *s; GList *c; @@ -72,6 +70,7 @@ int main(int argc, char **argv) { e_book_get_contacts(book, query, &contacts, &error); for (c = contacts; c; c = c->next) { + dump_as_rfc822(E_CONTACT(c->data)); } } }