summaryrefslogtreecommitdiffstats
path: root/test/use_append_mchunks.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-05-13 14:15:29 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-05-13 14:15:29 (GMT)
commit2c78a1930b11ef10aa92d3cdeb8486d2ede1b33b (patch)
tree6b1c378151b84b05308e183e5ebd72d8cf489d73 /test/use_append_mchunks.c
parent5ba81f88a3d4c1b6228d2647cbef434c813aef5b (diff)
downloadhdf5-2c78a1930b11ef10aa92d3cdeb8486d2ede1b33b.zip
hdf5-2c78a1930b11ef10aa92d3cdeb8486d2ede1b33b.tar.gz
hdf5-2c78a1930b11ef10aa92d3cdeb8486d2ede1b33b.tar.bz2
Whitespace updates
Diffstat (limited to 'test/use_append_mchunks.c')
-rw-r--r--test/use_append_mchunks.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index b7d45a4..41d355e 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -29,14 +29,14 @@
* finishes HDF5 metadata updates and issues H5Fflush or H5Oflush calls.
* o Readers will see newly appended data after the Writer finishes
* the flush operation.
- *
+ *
* Preconditions:
* o Readers are not allowed to modify the file.
* o All datasets that are modified by the Writer exist when the
* Writer opens the file.
* o All datasets that are modified by the Writer exist when a Reader
* opens the file.
- *
+ *
* Main Success Scenario:
* 1. An application creates a file with required objects (groups,
* datasets, and attributes).
@@ -45,7 +45,7 @@
* spans several chunks.
* 3. A Reader opens the file and a dataset in a file; if the size of
* the unlimited dimension has changed, reads the appended data back.
- *
+ *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Created: Albert Cheng, 2013/6/1 */
@@ -100,7 +100,7 @@ int setup_parameters(int argc, char * const argv[])
}
-/* Overall Algorithm:
+/* Overall Algorithm:
* Parse options from user;
* Generate/pre-created test files needed and close it;
* fork: child process becomes the reader process;
@@ -112,7 +112,7 @@ main(int argc, char *argv[])
{
pid_t childpid=0;
pid_t mypid, tmppid;
- int child_status;
+ int child_status;
int child_wait_option=0;
int ret_value = 0;
int child_ret_value;
@@ -127,7 +127,7 @@ main(int argc, char *argv[])
}
/* Determine the need to send/wait message file*/
- if(UC_opts.launch == UC_READWRITE) {
+ if (UC_opts.launch == UC_READWRITE) {
HDunlink(WRITER_MESSAGE);
send_wait = 1;
}
@@ -161,9 +161,9 @@ main(int argc, char *argv[])
/* ============= */
/* launch reader */
/* ============= */
- if (UC_opts.launch != UC_WRITER){
+ if (UC_opts.launch != UC_WRITER) {
/* child process launch the reader */
- if(0 == childpid) {
+ if (0 == childpid) {
HDprintf("%d: launch reader process\n", mypid);
if (read_uc_file(send_wait) < 0){
HDfprintf(stderr, "read_uc_file encountered error\n");
@@ -204,8 +204,8 @@ main(int argc, char *argv[])
/* ================================================ */
/* If readwrite, collect exit code of child process */
/* ================================================ */
- if (UC_opts.launch == UC_READWRITE){
- if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0){
+ if (UC_opts.launch == UC_READWRITE) {
+ if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
perror("waitpid");
Hgoto_error(1);
}
@@ -233,12 +233,11 @@ main(int argc, char *argv[])
Hgoto_error(2);
}
}
-
+
done:
- /* Print result and exit */
- if (ret_value != 0){
+ if (ret_value != 0) {
HDprintf("Error(s) encountered\n");
- }else{
+ } else {
HDprintf("All passed\n");
}