aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-06 01:19:42 +0200
committerMattias Andrée <maandree@kth.se>2021-04-06 01:19:42 +0200
commiteaf0b24b75eb20d9033201acfcb014f71472dae4 (patch)
tree192f533812e5d0aa67e64c3268aa6cd27e08f16d
parentm (diff)
downloadcontacts-eaf0b24b75eb20d9033201acfcb014f71472dae4.tar.gz
contacts-eaf0b24b75eb20d9033201acfcb014f71472dae4.tar.bz2
contacts-eaf0b24b75eb20d9033201acfcb014f71472dae4.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--set-contact-addresses.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/set-contact-addresses.c b/set-contact-addresses.c
index 4d81c41..7606e02 100644
--- a/set-contact-addresses.c
+++ b/set-contact-addresses.c
@@ -19,8 +19,8 @@ main(int argc, char *argv[])
int edit_address = 0, edit_context = 0, edit_location = 0;
int edit_country = 0, edit_careof = 0, edit_postcode = 0;
int edit_city = 0, edit = 0, remove = 0;
- char *address = NULL, *context = NULL, *location = NULL;
- char *country = NULL, *careof = NULL, *postcode = NULL, *city = NULL;
+ const char *address = NULL, *context = NULL, *location = NULL;
+ const char *country = NULL, *careof = NULL, *postcode = NULL, *city = NULL;
double lat, lon, lat_min = 0, lat_max = 0, lon_min = 0, lon_max = 0, flat, flon;
struct passwd *user;
struct libcontacts_contact contact;
@@ -221,7 +221,7 @@ main(int argc, char *argv[])
i = naddresses;
contact.addresses = erealloc(contact.addresses, (i + 2) * sizeof(*contact.addresses));
contact.addresses[i + 1] = NULL;
- contact.addresses[i] = ecalloc(1, sizeof(**contact.emails));
+ contact.addresses[i] = ecalloc(1, sizeof(**contact.addresses));
contact.addresses[i]->context = context ? estrdup(context) : NULL;
contact.addresses[i]->care_of = careof ? estrdup(careof) : NULL;
contact.addresses[i]->address = address ? estrdup(address) : NULL;