aboutsummaryrefslogtreecommitdiffstats
path: root/set-contact-birthday.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-04 14:10:26 +0200
committerMattias Andrée <maandree@kth.se>2021-04-04 14:10:26 +0200
commit6321be300b804894c8c150fac8749741b13dfb2d (patch)
treedefa3c9145ecdf6e3f74c4fcf09b20a50a81983f /set-contact-birthday.c
parentm + move common code from get-contact-birthday.c and list-birthdays.c to common-birthday.c (diff)
downloadcontacts-6321be300b804894c8c150fac8749741b13dfb2d.tar.gz
contacts-6321be300b804894c8c150fac8749741b13dfb2d.tar.bz2
contacts-6321be300b804894c8c150fac8749741b13dfb2d.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'set-contact-birthday.c')
-rw-r--r--set-contact-birthday.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/set-contact-birthday.c b/set-contact-birthday.c
index 535e635..9db0987 100644
--- a/set-contact-birthday.c
+++ b/set-contact-birthday.c
@@ -64,10 +64,12 @@ main(int argc, char *argv[])
if (before_on_common == 0)
usage();
before_on_common = 1;
+ break;
case 'B':
if (before_on_common == 1)
usage();
before_on_common = 0;
+ break;
case 'u':
remove = 1;
break;
@@ -114,7 +116,7 @@ main(int argc, char *argv[])
if (day)
contact.birthday->day = day < 0 ? 0 : (unsigned char)day;
if (before_on_common >= 0)
- contact.birthday->before_on_common = before_on_common;
+ contact.birthday->before_on_common = (unsigned char)before_on_common;
}
if (libcontacts_save_contact(&contact, user)) {
weprintf("libcontacts_save_contact %s:", *argv);