diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2006-10-12 03:55:06 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2006-10-12 03:55:06 (GMT) |
commit | e065eee4a8932e6c09557bc539d6674138e9d7fe (patch) | |
tree | 794fd744c2d3b5efbc7523005c20ee9461f1cdff /test/btree2.c | |
parent | 9b24333b1944e5b5c37aeff0b94fabfbacb15b20 (diff) | |
download | hdf5-e065eee4a8932e6c09557bc539d6674138e9d7fe.zip hdf5-e065eee4a8932e6c09557bc539d6674138e9d7fe.tar.gz hdf5-e065eee4a8932e6c09557bc539d6674138e9d7fe.tar.bz2 |
[svn-r12751] Purpose:
Bug fix (related to 544)
Description:
h5_get_file_size() was coded to return 0 if failed but
file size can be 0. Changed the failure return value to -1
which is allowed by the returned type of off_t which is a signed
type.
Also changed the checking code of the stat call to just == 0
since that is how it is defined.
Test:
Could test it in heping only. Both Sol and Copper failed to
compiled due to error in the Direct IO VFD code.
Diffstat (limited to 'test/btree2.c')
-rw-r--r-- | test/btree2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/btree2.c b/test/btree2.c index 10b46b3..70f389d 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -6734,7 +6734,7 @@ test_delete(hid_t fapl) STACK_ERROR /* Get the size of an empty file */ - if((empty_size = h5_get_file_size(filename)) == 0) + if((empty_size = h5_get_file_size(filename)) < 0) TEST_ERROR /* Create the file to work on */ @@ -6762,7 +6762,7 @@ test_delete(hid_t fapl) STACK_ERROR /* Get the size of the file */ - if((file_size = h5_get_file_size(filename)) == 0) + if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR /* Verify the file is correct size */ @@ -6812,7 +6812,7 @@ test_delete(hid_t fapl) STACK_ERROR /* Get the size of the file */ - if((file_size = h5_get_file_size(filename)) == 0) + if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR /* Verify the file is correct size */ @@ -6862,7 +6862,7 @@ test_delete(hid_t fapl) STACK_ERROR /* Get the size of the file */ - if((file_size = h5_get_file_size(filename)) == 0) + if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR /* Verify the file is correct size */ @@ -6912,7 +6912,7 @@ test_delete(hid_t fapl) STACK_ERROR /* Get the size of the file */ - if((file_size = h5_get_file_size(filename)) == 0) + if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR /* Verify the file is correct size */ |