summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2008-12-09 02:28:05 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2008-12-09 02:28:05 (GMT)
commit064fee6e8ecf49c619d1bf25c665cd543fb10295 (patch)
treee91e2a3089b734e73a75b587a0b9a259e6a23398
parent58090002a834804a7140df64d4f6ec66dac28e34 (diff)
downloadhdf5-064fee6e8ecf49c619d1bf25c665cd543fb10295.zip
hdf5-064fee6e8ecf49c619d1bf25c665cd543fb10295.tar.gz
hdf5-064fee6e8ecf49c619d1bf25c665cd543fb10295.tar.bz2
[svn-r16167] 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.
-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));