aboutsummaryrefslogtreecommitdiff
path: root/libexec/rtld-elf/rtld.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2012-04-05 10:38:07 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2012-04-05 10:38:07 +0000
commit0149ef5fcab8cfbaddd3c62f1500ff1fc16befdc (patch)
tree42a7db319ad868c8c93905e20ab18a84d14173e1 /libexec/rtld-elf/rtld.h
parentcbedde6b276cb3457283168a0b576117fbfe3065 (diff)
MFC r233307:
Use xmalloc() instead of malloc() in the places where malloc() calls are assumed to not fail. Make the xcalloc() calling conventions follow the calloc(3) calling conventions and replace unchecked calls to calloc() with calls to xcalloc(). Remove redundand declarations from xmalloc.c, which are already present in rtld.h.
Notes
svn path=/stable/9/; revision=233922
Diffstat (limited to 'libexec/rtld-elf/rtld.h')
-rw-r--r--libexec/rtld-elf/rtld.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index cacea8ca53f5..8089012b6740 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -58,7 +58,7 @@
#endif
#define NEW(type) ((type *) xmalloc(sizeof(type)))
-#define CNEW(type) ((type *) xcalloc(sizeof(type)))
+#define CNEW(type) ((type *) xcalloc(1, sizeof(type)))
/* We might as well do booleans like C++. */
typedef unsigned char bool;
@@ -320,7 +320,7 @@ typedef struct Struct_SymLook {
extern void _rtld_error(const char *, ...) __printflike(1, 2);
extern const char *rtld_strerror(int);
extern Obj_Entry *map_object(int, const char *, const struct stat *);
-extern void *xcalloc(size_t);
+extern void *xcalloc(size_t, size_t);
extern void *xmalloc(size_t);
extern char *xstrdup(const char *);
extern Elf_Addr _GLOBAL_OFFSET_TABLE_[];