diff options
author | Bruno Haible <bruno@clisp.org> | 2006-11-06 13:03:10 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2006-11-06 13:03:10 +0000 |
commit | 7c6d5072278ec9af612e21f0507a009ed37816e1 (patch) | |
tree | 4e0bcf24e84f383c08595557cc23d1fcc38a9d82 /lib/gl_sublist.c | |
parent | 2c4a44a5d092da2f1c2864b27ca382f77faeb63d (diff) | |
download | gnulib-7c6d5072278ec9af612e21f0507a009ed37816e1.tar.gz |
Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
Diffstat (limited to 'lib/gl_sublist.c')
-rw-r--r-- | lib/gl_sublist.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gl_sublist.c b/lib/gl_sublist.c index e851c882fc..87eb6e1212 100644 --- a/lib/gl_sublist.c +++ b/lib/gl_sublist.c @@ -430,8 +430,7 @@ gl_sublist_create (gl_list_t whole_list, size_t start_index, size_t end_index) /* Invalid arguments. */ abort (); { - struct gl_list_impl *list = - (struct gl_list_impl *) xmalloc (sizeof (struct gl_list_impl)); + struct gl_list_impl *list = XMALLOC (struct gl_list_impl); list->base.vtable = &gl_sublist_list_implementation; list->base.equals_fn = whole_list->base.equals_fn; /* actually unused */ |