(loop): only check errsock if it's valid

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11899 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2003-03-24 03:31:40 +00:00
parent c9c606ce8f
commit 653e96e023

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997 - 2002 Kungliga Tekniska H<>gskolan * Copyright (c) 1997 - 2003 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -87,7 +87,7 @@ loop (int s, int errsock)
init_ivecs(1); init_ivecs(1);
#endif #endif
if (s >= FD_SETSIZE || errsock >= FD_SETSIZE) if (s >= FD_SETSIZE || (errsock != -1 && errsock >= FD_SETSIZE))
errx (1, "fd too large"); errx (1, "fd too large");
FD_ZERO(&real_readset); FD_ZERO(&real_readset);