diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2004-08-23 23:35:23 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2004-08-23 23:35:23 (GMT) |
commit | 6bedc7a7294c3bb726a3157ac9d305b4ceae9dc6 (patch) | |
tree | 07b2e4f1d1c28d585226689d91e034d11d6494df | |
parent | df7f7f48e205789ea8b25c614bd8cc2d80adf262 (diff) | |
download | hdf5-6bedc7a7294c3bb726a3157ac9d305b4ceae9dc6.zip hdf5-6bedc7a7294c3bb726a3157ac9d305b4ceae9dc6.tar.gz hdf5-6bedc7a7294c3bb726a3157ac9d305b4ceae9dc6.tar.bz2 |
[svn-r9140] 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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/testframe.c b/test/testframe.c index cebb558..b3bc378 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -212,6 +212,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)) { @@ -274,7 +276,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); } } |