diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-03 12:55:33 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-03 12:55:33 +0200 |
commit | c2b33333b84dd0534b2cb153c7a9f31c354ddad4 (patch) | |
tree | 21295fb55d63eeffefa43472f76c69de88979c9f /set-contact-gender.c | |
parent | m + Add multicall binary (diff) | |
download | contacts-c2b33333b84dd0534b2cb153c7a9f31c354ddad4.tar.gz contacts-c2b33333b84dd0534b2cb153c7a9f31c354ddad4.tar.bz2 contacts-c2b33333b84dd0534b2cb153c7a9f31c354ddad4.tar.xz |
m + add more tools
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | set-contact-gender.c | 6 |
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; |