summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2001-06-01 18:47:03 +0000
committerSterling Hughes <sterling@php.net>2001-06-01 18:47:03 +0000
commitc6402b2a2ff5ac592dfafe392024bcb2d16e26fb (patch)
tree63fc2ccbab0703e30587cdd8b5ae0c5c8d406b88
parent015e1d3d68f3c365637180335fa136ec89b649d0 (diff)
downloadphp-git-c6402b2a2ff5ac592dfafe392024bcb2d16e26fb.tar.gz
# see
.
-rw-r--r--ext/sockets/sockets.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index cc591ab9d0..bb37e209c3 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -367,15 +367,9 @@ PHP_MINFO_FUNCTION(sockets)
Allocates a new file descriptor set */
PHP_FUNCTION(socket_fd_alloc)
{
- fd_set *set;
-
- if ((set = (fd_set*)emalloc(sizeof(fd_set))) == NULL) {
- php_error(E_WARNING, "cannot allocate file descriptor");
- RETURN_FALSE;
- }
-
- FD_ZERO(set);
- ZEND_REGISTER_RESOURCE(return_value, set, le_destroy);
+ fd_set set;
+ FD_ZERO(&set);
+ ZEND_REGISTER_RESOURCE(return_value, &set, le_destroy);
}
/* }}} */
@@ -482,7 +476,7 @@ PHP_FUNCTION(socket_fd_zero)
PHP_FUNCTION(socket_select)
{
zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6;
- php_sock *php_sock;
+ php_socket *php_sock;
struct timeval tv;
fd_set *rfds, *wfds, *xfds;