dreid 02/01/13 06:38:38
Modified: network_io/beos poll.c
Log:
No point in using apr_pcalloc when we then go on to use FD_ZERO is there?
Revision Changes Path
1.29 +9 -6 apr/network_io/beos/poll.c
Index: poll.c
===================================================================
RCS file: /home/cvs/apr/network_io/beos/poll.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- poll.c 10 Aug 2001 21:04:47 -0000 1.28
+++ poll.c 13 Jan 2002 14:38:38 -0000 1.29
@@ -70,16 +70,18 @@
APR_DECLARE(apr_status_t) apr_poll_setup(apr_pollfd_t **new, apr_int32_t
num, apr_pool_t *cont)
{
(*new) = (apr_pollfd_t *)apr_pcalloc(cont, sizeof(apr_pollfd_t) * num);
+
if ((*new) == NULL) {
return APR_ENOMEM;
}
+
(*new)->cntxt = cont;
- (*new)->read = (fd_set *)apr_pcalloc(cont, sizeof(fd_set));
- (*new)->write = (fd_set *)apr_pcalloc(cont, sizeof(fd_set));
- (*new)->except = (fd_set *)apr_pcalloc(cont, sizeof(fd_set));
- (*new)->read_set = (fd_set *)apr_pcalloc(cont, sizeof(fd_set));
- (*new)->write_set = (fd_set *)apr_pcalloc(cont, sizeof(fd_set));
- (*new)->except_set = (fd_set *)apr_pcalloc(cont, sizeof(fd_set));
+ (*new)->read = (fd_set *)apr_palloc(cont, sizeof(fd_set));
+ (*new)->write = (fd_set *)apr_palloc(cont, sizeof(fd_set));
+ (*new)->except = (fd_set *)apr_palloc(cont, sizeof(fd_set));
+ (*new)->read_set = (fd_set *)apr_palloc(cont, sizeof(fd_set));
+ (*new)->write_set = (fd_set *)apr_palloc(cont, sizeof(fd_set));
+ (*new)->except_set = (fd_set *)apr_palloc(cont, sizeof(fd_set));
FD_ZERO((*new)->read);
FD_ZERO((*new)->write);
FD_ZERO((*new)->except);
@@ -87,6 +89,7 @@
FD_ZERO((*new)->write_set);
FD_ZERO((*new)->except_set);
(*new)->highsock = -1;
+
return APR_SUCCESS;
}