From eaf0b24b75eb20d9033201acfcb014f71472dae4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 6 Apr 2021 01:19:42 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- set-contact-addresses.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'set-contact-addresses.c') 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; -- cgit v1.2.3-70-g09d2