X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=abook.c;h=557ddb2f5818f7a4c5f9c8d855278aa8dc418747;hb=781c0d657fffe80e45d0fda6ed5ddbf5f796fefb;hp=c754499260281e02a0dd4302797b2d10769b87fc;hpb=a4028acb18fd04cbf03ddbd976115aeb04ddd867;p=pkg%2Fabook.git diff --git a/abook.c b/abook.c index c754499..557ddb2 100644 --- a/abook.c +++ b/abook.c @@ -105,7 +105,7 @@ xmalloc_error_handler(int err) { /* * We don't try to save addressbook here because we don't know - * if it's fully loaded to to memory. + * if it's fully loaded to memory. */ if(is_ui_initialized()) close_ui(); @@ -259,7 +259,7 @@ set_filename(char **var, char *path) assert(path != NULL); if(*path == '/') { - *var = strdup(path); + *var = xstrdup(path); return; } @@ -503,7 +503,7 @@ make_mailstr(int item) ret = *database[item][EMAIL] ? mkstr("%s <%s>", name, email) : - strdup(name); + xstrdup(name); free(name); @@ -745,8 +745,8 @@ add_email_add_item(int quiet, char *name, char *email) } memset(item, 0, sizeof(item)); - item[NAME] = strdup(name); - item[EMAIL] = strdup(email); + item[NAME] = xstrdup(name); + item[EMAIL] = xstrdup(email); add_item2database(item); return 1;