summaryrefslogtreecommitdiff
path: root/ext/posix/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/posix/posix.c')
-rw-r--r--ext/posix/posix.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index bb23a5bc29..516b8f2318 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -805,8 +805,7 @@ PHP_FUNCTION(posix_ttyname)
}
break;
default:
- convert_to_long_ex(z_fd);
- fd = Z_LVAL_P(z_fd);
+ fd = zval_get_long(z_fd);
}
#if defined(ZTS) && defined(HAVE_TTYNAME_R) && defined(_SC_TTY_NAME_MAX)
buflen = sysconf(_SC_TTY_NAME_MAX);
@@ -850,8 +849,7 @@ PHP_FUNCTION(posix_isatty)
}
break;
default:
- convert_to_long_ex(z_fd);
- fd = Z_LVAL_P(z_fd);
+ fd = zval_get_long(z_fd);
}
if (isatty(fd)) {