diff options
author | Bruno Haible <bruno@clisp.org> | 2006-11-06 20:15:10 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:14:19 +0200 |
commit | e86f6c583e542d6a1d2d2b5f6bfaa5c155654f0f (patch) | |
tree | 160564919f1fea7fbfa5d4a5fcd294867012ca6a /gettext-tools/src/str-list.c | |
parent | 9484d0c4feb9cc4efe47f69967b406e2b960596b (diff) | |
download | external_gettext-e86f6c583e542d6a1d2d2b5f6bfaa5c155654f0f.zip external_gettext-e86f6c583e542d6a1d2d2b5f6bfaa5c155654f0f.tar.gz external_gettext-e86f6c583e542d6a1d2d2b5f6bfaa5c155654f0f.tar.bz2 |
New macros XMALLOC, XNMALLOC.
Diffstat (limited to 'gettext-tools/src/str-list.c')
-rw-r--r-- | gettext-tools/src/str-list.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gettext-tools/src/str-list.c b/gettext-tools/src/str-list.c index 484d9e6..35af5f1 100644 --- a/gettext-tools/src/str-list.c +++ b/gettext-tools/src/str-list.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995, 1998, 2000-2004 Free Software Foundation, Inc. + Copyright (C) 1995, 1998, 2000-2004, 2006 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> @@ -47,7 +47,7 @@ string_list_alloc () { string_list_ty *slp; - slp = (string_list_ty *) xmalloc (sizeof (*slp)); + slp = XMALLOC (string_list_ty); slp->item = NULL; slp->nitems = 0; slp->nitems_max = 0; @@ -141,7 +141,7 @@ string_list_concat (const string_list_ty *slp) len = 1; for (j = 0; j < slp->nitems; ++j) len += strlen (slp->item[j]); - result = (char *) xmalloc (len); + result = XNMALLOC (len, char); pos = 0; for (j = 0; j < slp->nitems; ++j) { @@ -199,7 +199,7 @@ string_list_join (const string_list_ty *slp, char separator, } if (terminator) ++len; - result = (char *) xmalloc (len); + result = XNMALLOC (len, char); pos = 0; for (j = 0; j < slp->nitems; ++j) { |