aboutsummaryrefslogtreecommitdiffstats
path: root/set-contact-gender.c
diff options
context:
space:
mode:
Diffstat (limited to 'set-contact-gender.c')
-rw-r--r--set-contact-gender.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/set-contact-gender.c b/set-contact-gender.c
index f9750d6..b0b0258 100644
--- a/set-contact-gender.c
+++ b/set-contact-gender.c
@@ -57,14 +57,16 @@ main(int argc, char *argv[])
if (libcontacts_load_contact(*argv, &contact, user)) {
weprintf("libcontacts_load_contact %s: %s\n", *argv, errno ? strerror(errno) : "contact file is malformatted");
ret = 1;
- } else {
+ continue;
+ }
+ if (contact.gender != gender) {
contact.gender = gender;
if (libcontacts_save_contact(&contact, user)) {
weprintf("libcontacts_save_contact %s:", *argv);
ret = 1;
}
- libcontacts_contact_destroy(&contact);
}
+ libcontacts_contact_destroy(&contact);
}
return ret;