summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2008-12-09 02:29:06 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2008-12-09 02:29:06 (GMT)
commit27c239c2d17d33f9edd6546b664bc2720c8c34c7 (patch)
tree34ec2d58a7805813d0f58d76e6ed26d831e6c848 /perform
parent3dcdd204de26d51ef5da5ade7a94d7a462991e20 (diff)
downloadhdf5-27c239c2d17d33f9edd6546b664bc2720c8c34c7.zip
hdf5-27c239c2d17d33f9edd6546b664bc2720c8c34c7.tar.gz
hdf5-27c239c2d17d33f9edd6546b664bc2720c8c34c7.tar.bz2
[svn-r16168] Bug fix: 1089
Description: One open() call with O_CREAT flag did not have the third required argument. Solution: Added the right third argument. Also changed all open() calls to HDopen macros for more portable coding. Tested: h5committested.
Diffstat (limited to 'perform')
-rw-r--r--perform/zip_perf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/perform/zip_perf.c b/perform/zip_perf.c
index 35a3706..d7b75c7 100644
--- a/perform/zip_perf.c
+++ b/perform/zip_perf.c
@@ -436,7 +436,7 @@ fill_with_random_data(Bytef *src, uLongf src_len)
if (stat("/dev/urandom", &stat_buf) == 0) {
uLongf len = src_len;
Bytef *buf = src;
- int fd = open("/dev/urandom", O_RDONLY);
+ int fd = HDopen("/dev/urandom", O_RDONLY, 0);
printf("Using /dev/urandom for random data\n");
@@ -510,7 +510,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size,
/* do uncompressed data write */
gettimeofday(&timer_start, NULL);
- output = open(filename, O_RDWR | O_CREAT, S_IRWXU);
+ output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU);
if (output == -1)
error(strerror(errno));
@@ -549,7 +549,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size,
unlink(filename);
/* do compressed data write */
- output = open(filename, O_RDWR | O_CREAT);
+ output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU);
if (output == -1)
error(strerror(errno));