* lib/xstriconv.c: Include xwalloc.h instead of xalloc.h. (xmem_cd_iconv, xstr_cd_iconv, xstr_iconv): Use xwalloc_die instead of xalloc_die. * modules/xstriconv (Depends-on): Remove xalloc, add xwalloc. --- ChangeLog | 6 ++++++ lib/xstriconv.c | 8 ++++---- modules/xstriconv | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 4b34cb9..5c50179 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2017-06-04 Paul Eggert <[email protected]> + xstriconv: use xwalloc rather than xalloc + * lib/xstriconv.c: Include xwalloc.h instead of xalloc.h. + (xmem_cd_iconv, xstr_cd_iconv, xstr_iconv): + Use xwalloc_die instead of xalloc_die. + * modules/xstriconv (Depends-on): Remove xalloc, add xwalloc. + trim: use xwalloc rather than xalloc * lib/trim.c: Include xwalloc.h instead of xalloc.h. (trim2): Use xwstrdup rather than strdup and xalloc_die. diff --git a/lib/xstriconv.c b/lib/xstriconv.c index 21546b6..a5ebfff 100644 --- a/lib/xstriconv.c +++ b/lib/xstriconv.c @@ -23,7 +23,7 @@ #include <errno.h> #include "striconv.h" -#include "xalloc.h" +#include "xwalloc.h" #if HAVE_ICONV @@ -35,7 +35,7 @@ xmem_cd_iconv (const char *src, size_t srclen, iconv_t cd, int retval = mem_cd_iconv (src, srclen, cd, resultp, lengthp); if (retval < 0 && errno == ENOMEM) - xalloc_die (); + xwalloc_die (-1); return retval; } @@ -45,7 +45,7 @@ xstr_cd_iconv (const char *src, iconv_t cd) char *result = str_cd_iconv (src, cd); if (result == NULL && errno == ENOMEM) - xalloc_die (); + xwalloc_die (-1); return result; } @@ -57,6 +57,6 @@ xstr_iconv (const char *src, const char *from_codeset, const char *to_codeset) char *result = str_iconv (src, from_codeset, to_codeset); if (result == NULL && errno == ENOMEM) - xalloc_die (); + xwalloc_die (-1); return result; } diff --git a/modules/xstriconv b/modules/xstriconv index ce95f86..908a2ba 100644 --- a/modules/xstriconv +++ b/modules/xstriconv @@ -8,7 +8,7 @@ lib/xstriconv.c Depends-on: striconv -xalloc +xwalloc configure.ac: -- 2.9.4
