summaryrefslogtreecommitdiff
path: root/ext/dbase
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-04-30 19:01:17 +0000
committerAndi Gutmans <andi@php.net>2000-04-30 19:01:17 +0000
commit5d5b09e1a73bb8446095df86ed61370c48385a55 (patch)
tree03a61a74b9e84476a185c914ecf5985c8e8acf78 /ext/dbase
parent1f64d98753c407afdd788ba123ff077e81a342d3 (diff)
downloadphp-git-5d5b09e1a73bb8446095df86ed61370c48385a55.tar.gz
- Change some open's to V_OPEN()'s
Diffstat (limited to 'ext/dbase')
-rw-r--r--ext/dbase/dbase.c6
-rw-r--r--ext/dbase/dbf_head.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c
index c7222fdc9c..110f03061a 100644
--- a/ext/dbase/dbase.c
+++ b/ext/dbase/dbase.c
@@ -586,15 +586,15 @@ PHP_FUNCTION(dbase_create) {
RETURN_FALSE;
}
- if (PG(safe_mode) && (!php_checkuid(filename->value.str.val, 2))) {
+ if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_P(filename), 2))) {
RETURN_FALSE;
}
- if (php_check_open_basedir(filename->value.str.val)) {
+ if (php_check_open_basedir(Z_STRVAL_P(filename))) {
RETURN_FALSE;
}
- if ((fd = open(filename->value.str.val, O_BINARY|O_RDWR|O_CREAT, 0644)) < 0) {
+ if ((fd = V_OPEN((Z_STRVAL_P(filename), O_BINARY|O_RDWR|O_CREAT, 0644))) < 0) {
php_error(E_WARNING, "Unable to create database (%d): %s", errno, strerror(errno));
RETURN_FALSE;
}
diff --git a/ext/dbase/dbf_head.c b/ext/dbase/dbf_head.c
index 1f104e3d81..cc97330347 100644
--- a/ext/dbase/dbf_head.c
+++ b/ext/dbase/dbf_head.c
@@ -226,10 +226,10 @@ dbhead_t *dbf_open(char *dp, int o_flags)
dbhead_t *dbh;
cp = dp;
- if ((fd = open(cp, o_flags|O_BINARY)) < 0) {
+ if ((fd = V_OPEN((cp, o_flags|O_BINARY))) < 0) {
cp = (char *)malloc(256);
strcpy(cp, dp); strcat(cp, ".dbf");
- if ((fd = open(cp, o_flags)) < 0) {
+ if ((fd = V_OPEN((cp, o_flags))) < 0) {
perror("open");
return NULL;
}