diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-13 17:29:14 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-13 17:29:14 +0200 |
commit | 6546989d280d8fc1e8e2bc152f08d9b04090d4b8 (patch) | |
tree | d201c83a72d9ef296773794d0cfce6dd7ecab7e0 /libcontacts_load_contact.c | |
parent | Update todo: do not support multiple calendars, all birthdays shall be stored in gregorian, and other software shall convert (diff) | |
download | libcontacts-6546989d280d8fc1e8e2bc152f08d9b04090d4b8.tar.gz libcontacts-6546989d280d8fc1e8e2bc152f08d9b04090d4b8.tar.bz2 libcontacts-6546989d280d8fc1e8e2bc152f08d9b04090d4b8.tar.xz |
m + add section 3 man pages
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libcontacts_load_contact.c')
-rw-r--r-- | libcontacts_load_contact.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcontacts_load_contact.c b/libcontacts_load_contact.c index 0821871..af931f9 100644 --- a/libcontacts_load_contact.c +++ b/libcontacts_load_contact.c @@ -3,7 +3,7 @@ int -libcontacts_load_contact(const char *id, struct libcontacts_contact *contact, const struct passwd *user) +libcontacts_load_contact(const char *id, struct libcontacts_contact *contactp, const struct passwd *user) { int ret, fd, saved_errno; char *data = NULL, *path; @@ -11,7 +11,7 @@ libcontacts_load_contact(const char *id, struct libcontacts_contact *contact, co ssize_t r; void *new; - if (!contact) { + if (!contactp) { errno = EINVAL; return -1; } @@ -48,11 +48,11 @@ libcontacts_load_contact(const char *id, struct libcontacts_contact *contact, co } close(fd); - ret = libcontacts_parse_contact(data, contact); + ret = libcontacts_parse_contact(data, contactp); free(data); - if (!ret && !(contact->id = strdup(id))) { - libcontacts_contact_destroy(contact); - memset(contact, 0, sizeof(*contact)); + if (!ret && !(contactp->id = strdup(id))) { + libcontacts_contact_destroy(contactp); + memset(contactp, 0, sizeof(*contactp)); return -1; } return ret; |