diff options
author | Christopher Faylor <me@cgf.cx> | 2000-03-30 07:51:30 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-03-30 07:51:30 +0400 |
commit | e3be633dd84966dd8f29feeb2bffce8a266e8715 (patch) | |
tree | 9cdc9179fb9dd43b45ec06e4a8705c30074a8002 /winsup | |
parent | 5f4d6baaf2dda6525860b8a44524f4cafb8c6a9e (diff) |
* fhandler.h (select_record): Explicitly zero elements of this class.
(select_stuff): Ditto.
* select.cc (cygwin_select): Eliminate memset zero of sel.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/fhandler.h | 13 | ||||
-rw-r--r-- | winsup/cygwin/select.cc | 1 |
3 files changed, 18 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 4b334f7d9..7520d6ee4 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +Wed Mar 29 22:49:56 2000 Christopher Faylor <cgf@cygnus.com> + + * fhandler.h (select_record): Explicitly zero elements of this class. + (select_stuff): Ditto. + * select.cc (cygwin_select): Eliminate memset zero of sel. + Tue Mar 28 16:45:42 2000 Christopher Faylor <cgf@cygnus.com> * Makefile.in: Use default rules when compiling cygrun.o. diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index f92ee88ba..acecb63df 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -773,7 +773,6 @@ struct select_record BOOL windows_handle; BOOL read_ready, write_ready, except_ready; BOOL read_selected, write_selected, except_selected; - select_record (fhandler_base *in_fh = NULL) {memset (this, 0, sizeof(select_record)); fh = in_fh;} int (*startup) (select_record *me, class select_stuff *stuff); int (*poll) (select_record *me, fd_set *readfds, fd_set *writefds, fd_set *exceptfds); @@ -781,12 +780,24 @@ struct select_record fd_set *exceptfds); void (*cleanup) (select_record *me, class select_stuff *stuff); struct select_record *next; + + select_record (fhandler_base *in_fh = NULL) {memset (this, 0, sizeof(select_record)); fh = in_fh;} + select_record (int) : fd (0), h (NULL), fh (0), saw_error (0), windows_handle (0), + read_ready (0), write_ready (0), except_ready (0), + read_selected (0), write_selected (0), except_selected (0), + startup (NULL), poll (NULL), verify (NULL), cleanup (NULL), + next (NULL) {} }; class select_stuff { public: ~select_stuff (); + select_stuff (): always_ready (0), windows_used (0), + total (0), start (0) + { + memset (device_specific, 0, sizeof (device_specific)); + } BOOL always_ready, windows_used; int total; select_record start; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 1199b1c55..b87adc123 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -121,7 +121,6 @@ cygwin_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, select_printf ("%d, %p, %p, %p, %p", n, readfds, writefds, exceptfds, to); - memset (&sel, 0, sizeof (sel)); if (!readfds) { UNIX_FD_ZERO (dummy_readfds, n); |