mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Explicitly check that fd>=0 in register_extended.
This commit is contained in:
parent
4a2a06a881
commit
7d12ad0f36
@ -1,3 +1,7 @@
|
||||
2003-11-08 Hrvoje Niksic <hniksic@xemacs.org>
|
||||
|
||||
* connect.c (register_extended): Check that fd >= 0.
|
||||
|
||||
2003-11-07 Hrvoje Niksic <hniksic@xemacs.org>
|
||||
|
||||
* connect.c (LAZY_RETRIEVE_INFO): Set LAST_INFO.
|
||||
|
@ -628,7 +628,14 @@ void
|
||||
register_extended (int fd, xreader_t reader, xwriter_t writer,
|
||||
xpoller_t poller, xcloser_t closer, void *ctx)
|
||||
{
|
||||
struct extended_info *info = xnew (struct extended_info);
|
||||
struct extended_info *info;
|
||||
|
||||
/* The file descriptor must be non-negative to be registered.
|
||||
Negative values are ignored by xclose(), and -1 cannot be used as
|
||||
hash key. */
|
||||
assert (fd >= 0);
|
||||
|
||||
info = xnew (struct extended_info);
|
||||
info->reader = reader;
|
||||
info->writer = writer;
|
||||
info->poller = poller;
|
||||
|
Loading…
Reference in New Issue
Block a user