summaryrefslogtreecommitdiffstats
path: root/test/lheap.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-17 22:38:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-17 22:38:50 (GMT)
commit80385ab8dd171a8410bd8e7dfce0e6b679c3fc97 (patch)
treef3ed5401e74382b5f316a7057c091d6c336ef0a1 /test/lheap.c
parent0db6255d805b625f3fbbbb0b0893032af229d234 (diff)
downloadhdf5-80385ab8dd171a8410bd8e7dfce0e6b679c3fc97.zip
hdf5-80385ab8dd171a8410bd8e7dfce0e6b679c3fc97.tar.gz
hdf5-80385ab8dd171a8410bd8e7dfce0e6b679c3fc97.tar.bz2
[svn-r18032] Description:
Bring r18031 from trunk to 1.8 branch: Bring r18030 from merge_metadata_journaling branch to trunk: Bring "brush clearing" changes (whitespace & style issues, mostly) from metadata_journaling branch to the "merging" branch, to converge the trunk and the metadata_journaling branch. Also, some other minor cleanups along the way. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode (h5committested on trunk)
Diffstat (limited to 'test/lheap.c')
-rw-r--r--test/lheap.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/test/lheap.c b/test/lheap.c
index 537d42d..b6591ef 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -76,7 +76,7 @@ main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
- if(NULL == (f = H5I_object(file))) {
+ if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -93,16 +93,18 @@ main(void)
}
for(i = 0; i < NOBJS; i++) {
sprintf(buf, "%03d-", i);
- for (j=4; j<i; j++) buf[j] = '0' + j%10;
- if (j>4) buf[j] = '\0';
+ for(j = 4; j < i; j++)
+ buf[j] = '0' + j % 10;
+ if(j > 4)
+ buf[j] = '\0';
- if ((size_t)(-1)==(obj[i]=H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf)+1, buf))) {
+ if((size_t)(-1) == (obj[i] = H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf) + 1, buf))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
}
- if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
+ if(H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -116,16 +118,18 @@ main(void)
TESTING("local heap read");
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) goto error;
- if (NULL==(f=H5I_object(file))) {
+ if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) goto error;
+ if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
- for (i=0; i<NOBJS; i++) {
+ for(i = 0; i < NOBJS; i++) {
sprintf(buf, "%03d-", i);
- for (j=4; j<i; j++) buf[j] = '0' + j%10;
- if (j>4) buf[j] = '\0';
+ for(j = 4; j < i; j++)
+ buf[j] = '0' + j % 10;
+ if(j > 4)
+ buf[j] = '\0';
if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC_READ))) {
H5_FAILED();
@@ -133,7 +137,7 @@ main(void)
goto error;
}
- if (NULL == (s = H5HL_offset_into(f, heap, obj[i]))) {
+ if (NULL == (s = (const char *)H5HL_offset_into(f, heap, obj[i]))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -147,7 +151,7 @@ main(void)
goto error;
}
- if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
+ if(H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -168,3 +172,4 @@ main(void)
} H5E_END_TRY;
return 1;
}
+