[llvm-commits] [test-suite] r58166 - /test-suite/trunk/MultiSource/Benchmarks/MiBench/network-patricia/patricia_test.c
Dan Gohman
gohman at apple.com
Sat Oct 25 16:14:20 PDT 2008
Author: djg
Date: Sat Oct 25 18:14:20 2008
New Revision: 58166
URL: http://llvm.org/viewvc/llvm-project?rev=58166&view=rev
Log:
exit(0) on success, non-zero on failure.
Modified:
test-suite/trunk/MultiSource/Benchmarks/MiBench/network-patricia/patricia_test.c
Modified: test-suite/trunk/MultiSource/Benchmarks/MiBench/network-patricia/patricia_test.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MiBench/network-patricia/patricia_test.c?rev=58166&r1=58165&r2=58166&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MiBench/network-patricia/patricia_test.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MiBench/network-patricia/patricia_test.c Sat Oct 25 18:14:20 2008
@@ -78,7 +78,7 @@
*/
if ((fp = fopen(argv[1], "r")) == NULL) {
printf("File %s doesn't seem to exist\n",argv[1]);
- exit(0);
+ exit(1);
}
/*
@@ -94,21 +94,21 @@
phead = (struct ptree *)malloc(sizeof(struct ptree));
if (!phead) {
perror("Allocating p-trie node");
- exit(0);
+ exit(1);
}
bzero(phead, sizeof(*phead));
phead->p_m = (struct ptree_mask *)malloc(
sizeof(struct ptree_mask));
if (!phead->p_m) {
perror("Allocating p-trie mask data");
- exit(0);
+ exit(1);
}
bzero(phead->p_m, sizeof(*phead->p_m));
pm = phead->p_m;
pm->pm_data = (struct MyNode *)malloc(sizeof(struct MyNode));
if (!pm->pm_data) {
perror("Allocating p-trie mask's node data");
- exit(0);
+ exit(1);
}
bzero(pm->pm_data, sizeof(*pm->pm_data));
/*******
@@ -137,7 +137,7 @@
p = (struct ptree *)malloc(sizeof(struct ptree));
if (!p) {
perror("Allocating p-trie node");
- exit(0);
+ exit(1);
}
bzero(p, sizeof(*p));
@@ -148,7 +148,7 @@
sizeof(struct ptree_mask));
if (!p->p_m) {
perror("Allocating p-trie mask data");
- exit(0);
+ exit(1);
}
bzero(p->p_m, sizeof(*p->p_m));
@@ -160,7 +160,7 @@
pm->pm_data = (struct MyNode *)malloc(sizeof(struct MyNode));
if (!pm->pm_data) {
perror("Allocating p-trie mask's node data");
- exit(0);
+ exit(1);
}
bzero(pm->pm_data, sizeof(*pm->pm_data));
@@ -191,9 +191,9 @@
}
if (!p) {
fprintf(stderr, "Failed on pat_insert\n");
- exit(0);
+ exit(1);
}
}
- exit(1);
+ exit(0);
}
More information about the llvm-commits
mailing list