summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2004-08-23 23:35:17 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2004-08-23 23:35:17 (GMT)
commit731fc09dad2322c8def9a761afdc6f1e7e460b2f (patch)
treeb586bb269763d1c0196767c3c3b69f9c6b31fc8a
parent8a2a3596a57607f43f12edaf1e9d584eb9e006e6 (diff)
downloadhdf5-731fc09dad2322c8def9a761afdc6f1e7e460b2f.zip
hdf5-731fc09dad2322c8def9a761afdc6f1e7e460b2f.tar.gz
hdf5-731fc09dad2322c8def9a761afdc6f1e7e460b2f.tar.bz2
[svn-r9139] Purpose:
Bug fix. Description: The return value of TestPrivateParser() was not tested, thus program would keep on going incorrectly even if errors were detected in TestPrivateParser. Solution: Check the return and exit accordingly. Platforms tested: Tested in Eirene and Sol in both serial and pp modes.
-rw-r--r--test/testframe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/testframe.c b/test/testframe.c
index 01829c3..b0bfacf 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -216,6 +216,8 @@ void TestInfo(const char *ProgName)
*/
void TestParseCmdLine(int argc, char *argv[])
{
+ int ret_code;
+
while (argv++, --argc > 0){
if ((HDstrcmp(*argv, "-verbose") == 0) ||
(HDstrcmp(*argv, "-v") == 0)) {
@@ -278,7 +280,9 @@ void TestParseCmdLine(int argc, char *argv[])
/* Call extra parsing function if provided. */
if (NULL != TestPrivateParser){
- TestPrivateParser(argc+1, argv-1);
+ ret_code=TestPrivateParser(argc+1, argv-1);
+ if (ret_code != 0)
+ exit(-1);
}
}