[llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/McCat/15-trie/trie.c
Evan Cheng
evan.cheng at apple.com
Tue Nov 28 09:35:34 PST 2006
Changes in directory llvm-test/MultiSource/Benchmarks/McCat/15-trie:
trie.c updated: 1.1 -> 1.2
---
Log message:
Fix undefined behavior, main should return 0 if executed correctly.
---
Diffs of the changes: (+4 -3)
trie.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Index: llvm-test/MultiSource/Benchmarks/McCat/15-trie/trie.c
diff -u llvm-test/MultiSource/Benchmarks/McCat/15-trie/trie.c:1.1 llvm-test/MultiSource/Benchmarks/McCat/15-trie/trie.c:1.2
--- llvm-test/MultiSource/Benchmarks/McCat/15-trie/trie.c:1.1 Mon May 12 13:30:53 2003
+++ llvm-test/MultiSource/Benchmarks/McCat/15-trie/trie.c Tue Nov 28 11:35:14 2006
@@ -318,7 +318,7 @@
return tr;
}
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
FILE * file;
char word[LINESIZE];
@@ -330,12 +330,12 @@
if(argc != 2)
{
fprintf(stdout, "Usage: %s <sourcefile>\n",argv[0]);
- exit(0);
+ return 1;
}
if(!(file = fopen(argv[1], "r")))
{
perror(argv[1]);
- exit(0);
+ return 1;
}
while(!feof(file))
{
@@ -352,4 +352,5 @@
}
fclose(file);
printT(tr);
+ return 0;
};
More information about the llvm-commits
mailing list