summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2008-12-09 02:29:57 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2008-12-09 02:29:57 (GMT)
commit0d8e7cafc7f155f64a76fd12ff6389c4f8f89f84 (patch)
tree39c4a8a6d0cd7ac32a5a5a7d84f2941f463a255a /perform
parent6e992ab3f7d05e29fdca8e1a7872f57cbc90cae3 (diff)
downloadhdf5-0d8e7cafc7f155f64a76fd12ff6389c4f8f89f84.zip
hdf5-0d8e7cafc7f155f64a76fd12ff6389c4f8f89f84.tar.gz
hdf5-0d8e7cafc7f155f64a76fd12ff6389c4f8f89f84.tar.bz2
[svn-r16169] 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 ad760ed..9eab2ee 100644
--- a/perform/zip_perf.c
+++ b/perform/zip_perf.c
@@ -433,7 +433,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");
@@ -507,7 +507,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));
@@ -546,7 +546,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));