summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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));