[llvm-commits] CVS: llvm/test/Programs/MultiSource/Applications/obsequi/init.c utils.h
John Criswell
criswell at cs.uiuc.edu
Tue May 11 14:47:04 PDT 2004
Changes in directory llvm/test/Programs/MultiSource/Applications/obsequi:
init.c updated: 1.1 -> 1.2
utils.h updated: 1.1 -> 1.2
---
Log message:
init.c : Changed malloc() to calloc() so that allocated memory is zeroed.
utils.h: Added #include guard to turn off annoying warnings.
---
Diffs of the changes: (+4 -1)
Index: llvm/test/Programs/MultiSource/Applications/obsequi/init.c
diff -u llvm/test/Programs/MultiSource/Applications/obsequi/init.c:1.1 llvm/test/Programs/MultiSource/Applications/obsequi/init.c:1.2
--- llvm/test/Programs/MultiSource/Applications/obsequi/init.c:1.1 Tue May 11 14:34:12 2004
+++ llvm/test/Programs/MultiSource/Applications/obsequi/init.c Tue May 11 14:45:39 2004
@@ -57,7 +57,7 @@
if(g_trans_table == NULL){
// first time initialization stuff.
- g_trans_table = malloc(HASHSIZE*sizeof(Hash_Entry));
+ g_trans_table = calloc(HASHSIZE,sizeof(Hash_Entry));
// initialize zobrist values
srandom(1);
Index: llvm/test/Programs/MultiSource/Applications/obsequi/utils.h
diff -u llvm/test/Programs/MultiSource/Applications/obsequi/utils.h:1.1 llvm/test/Programs/MultiSource/Applications/obsequi/utils.h:1.2
--- llvm/test/Programs/MultiSource/Applications/obsequi/utils.h:1.1 Tue May 11 14:34:13 2004
+++ llvm/test/Programs/MultiSource/Applications/obsequi/utils.h Tue May 11 14:45:39 2004
@@ -3,7 +3,10 @@
#ifndef OBSEQUI_UTILS_H
#define OBSEQUI_UTILS_H
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE //Need this so that __USE_GNU is defined
+#endif
+
#include <features.h>
#include <stdlib.h>
More information about the llvm-commits
mailing list