summaryrefslogtreecommitdiff
path: root/usr.bin/elf2aout/elf2aout.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/elf2aout/elf2aout.c')
-rw-r--r--usr.bin/elf2aout/elf2aout.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/elf2aout/elf2aout.c b/usr.bin/elf2aout/elf2aout.c
index dd714bfe98b..acca8a6cbc8 100644
--- a/usr.bin/elf2aout/elf2aout.c
+++ b/usr.bin/elf2aout/elf2aout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf2aout.c,v 1.5 2004/03/16 01:11:09 tedu Exp $ */
+/* $OpenBSD: elf2aout.c,v 1.6 2006/04/02 21:38:56 djm Exp $ */
/*
* Copyright (c) 1995
@@ -129,12 +129,11 @@ usage:
* Find space for a table matching ELF section indices to a.out
* symbol types.
*/
- symTypeTable = (int *) malloc(ex.e_shnum * sizeof(int));
+ symTypeTable = calloc(ex.e_shnum, sizeof(int));
if (!symTypeTable) {
fprintf(stderr, "symTypeTable: can't allocate.\n");
exit(1);
}
- memset(symTypeTable, 0, ex.e_shnum * sizeof(int));
/*
* Look for the symbol table and string table... Also map section