[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/13] xstriconv: use xwalloc rather than xalloc
From: |
Paul Eggert |
Subject: |
[PATCH 13/13] xstriconv: use xwalloc rather than xalloc |
Date: |
Sun, 4 Jun 2017 23:46:03 -0700 |
* 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 <address@hidden>
+ 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
- [PATCH 01/13] walloc: new module, Paul Eggert, 2017/06/05
- [PATCH 08/13] getgroups: use walloc, Paul Eggert, 2017/06/05
- [PATCH 06/13] acl-permissions: use walloc, Paul Eggert, 2017/06/05
- [PATCH 09/13] group-member: use walloc, Paul Eggert, 2017/06/05
- [PATCH 10/13] propername: use xwalloc rather than xalloc, Paul Eggert, 2017/06/05
- [PATCH 07/13] exclude: use xwalloc instead of xalloc, Paul Eggert, 2017/06/05
- [PATCH 13/13] xstriconv: use xwalloc rather than xalloc,
Paul Eggert <=
- [PATCH 02/13] xwalloc, xwalloc-die, xwallocator: new modules, Paul Eggert, 2017/06/05
- [PATCH 11/13] quotearg: use xwalloc rather than xalloc, Paul Eggert, 2017/06/05
- [PATCH 04/13] careadlinkat: use walloc, Paul Eggert, 2017/06/05
- [PATCH 05/13] dfa: use xwalloc instead of xalloc, Paul Eggert, 2017/06/05
- [PATCH 03/13] allocator: allow reasons other than size overflow, Paul Eggert, 2017/06/05
- [PATCH 12/13] trim: use xwalloc rather than xalloc, Paul Eggert, 2017/06/05