diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-12 13:37:59 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-12 13:37:59 +0200 |
commit | fa88a28e46b7ac2d3dcd1938e5e4708157d08b22 (patch) | |
tree | c3ca4f98374328f37d71d1079f9e1f7406ed84d8 /get-contact-photos.c | |
parent | Minor fix to set-contact-photos (diff) | |
download | contacts-fa88a28e46b7ac2d3dcd1938e5e4708157d08b22.tar.gz contacts-fa88a28e46b7ac2d3dcd1938e5e4708157d08b22.tar.bz2 contacts-fa88a28e46b7ac2d3dcd1938e5e4708157d08b22.tar.xz |
Deduplicate code and make some small improvements
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'get-contact-photos.c')
-rw-r--r-- | get-contact-photos.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/get-contact-photos.c b/get-contact-photos.c index 3b44393..115c776 100644 --- a/get-contact-photos.c +++ b/get-contact-photos.c @@ -45,8 +45,10 @@ main(int argc, char *argv[]) } for (; *argv; argv++) { - if (libcontacts_load_contact(*argv, &contact, user)) - eprintf("libcontacts_load_contact %s: %s\n", *argv, errno ? strerror(errno) : "contact file is malformatted"); + if (libcontacts_load_contact(*argv, &contact, user)) { + eprintf("libcontacts_load_contact %s: %s\n", *argv, + errno ? strerror(errno) : "contact file is malformatted"); + } if (!contact.photos) { libcontacts_contact_destroy(&contact); for (i = 0; photos[i]; i++) |