summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_main.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2009-10-21 00:34:42 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2009-10-21 00:34:42 (GMT)
commitce5e8b2a3961f5c429d7c25aaf68e85081a69bd0 (patch)
treeeb89f7667de1c1c28070b45245c37fd8c79eccfd /tools/h5repack/h5repack_main.c
parentaa46073801c8e6cc00a11cc0bda3fb1f70330535 (diff)
downloadhdf5-ce5e8b2a3961f5c429d7c25aaf68e85081a69bd0.zip
hdf5-ce5e8b2a3961f5c429d7c25aaf68e85081a69bd0.tar.gz
hdf5-ce5e8b2a3961f5c429d7c25aaf68e85081a69bd0.tar.bz2
[svn-r17704] Bug fix: (1192)
Changed exit(1) to exit(EXIT_FAILURE) and exit(0) to exit(EXIT_SUCCESS) for better coding. Tested: jam.
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r--tools/h5repack/h5repack_main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index 801ee34..d873a4b 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -69,7 +69,9 @@ static struct long_options l_opts[] = {
*
* Purpose: h5repack main program
*
- * Return: 1, error, 0, no error
+ * Return: Success: EXIT_SUCCESS(0)
+ *
+ * Failure: EXIT_FAILURE(1)
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
*
@@ -488,7 +490,7 @@ void read_info(const char *filename,
if ((fp = fopen(data_file, "r")) == (FILE *)NULL) {
error_msg(progname, "cannot open options file %s\n", filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* cycle until end of file reached */
@@ -525,7 +527,7 @@ void read_info(const char *filename,
if (h5repack_addfilter(comp_info,options)==-1){
error_msg(progname, "could not add compression option\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -555,7 +557,7 @@ void read_info(const char *filename,
if (h5repack_addlayout(comp_info,options)==-1){
error_msg(progname, "could not add chunck option\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -564,7 +566,7 @@ void read_info(const char *filename,
*/
else {
error_msg(progname, "bad file format for %s", filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
}