aboutsummaryrefslogtreecommitdiffstats
path: root/get-contact-photos.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-12 13:37:59 +0200
committerMattias Andrée <maandree@kth.se>2021-04-12 13:37:59 +0200
commitfa88a28e46b7ac2d3dcd1938e5e4708157d08b22 (patch)
treec3ca4f98374328f37d71d1079f9e1f7406ed84d8 /get-contact-photos.c
parentMinor fix to set-contact-photos (diff)
downloadcontacts-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.c6
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++)