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/write-java.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/write-java.c')
-rw-r--r-- | gettext-tools/src/write-java.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gettext-tools/src/write-java.c b/gettext-tools/src/write-java.c index 6b21646..2f3af25 100644 --- a/gettext-tools/src/write-java.c +++ b/gettext-tools/src/write-java.c @@ -180,7 +180,7 @@ compute_hashsize (message_list_ty *mlp, bool *collisionp) if (hashsize >= best_score) break; - bitmap = (char *) xmalloc (hashsize); + bitmap = XNMALLOC (hashsize, char); memset (bitmap, 0, hashsize); score = 0; @@ -293,12 +293,11 @@ static struct table_item * compute_table_items (message_list_ty *mlp, unsigned int hashsize) { unsigned int n = mlp->nitems; - struct table_item *arr = - (struct table_item *) xmalloc (n * sizeof (struct table_item)); + struct table_item *arr = XNMALLOC (n, struct table_item); char *bitmap; size_t j; - bitmap = (char *) xmalloc (hashsize); + bitmap = XNMALLOC (hashsize, char); memset (bitmap, 0, hashsize); for (j = 0; j < n; j++) |