diff options
Diffstat (limited to 'src/fdlist.c')
-rw-r--r-- | src/fdlist.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/fdlist.c b/src/fdlist.c index 4c1dd82..8dfbd2f 100644 --- a/src/fdlist.c +++ b/src/fdlist.c @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * fdlist.c: Maintains a list of file descriptors. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file fdlist.c + * \brief Maintains a list of file descriptors. + * \version $Id$ */ #include "stdinc.h" @@ -76,7 +78,7 @@ fdlist_init(void) static inline unsigned int hash_fd(int fd) { - return (((unsigned) fd) % FD_HASH_SIZE); + return ((unsigned int)fd) % FD_HASH_SIZE; } fde_t * @@ -87,11 +89,11 @@ lookup_fd(int fd) while (F) { if (F->fd == fd) - return (F); + return F; F = F->hnext; } - return (NULL); + return NULL; } /* Called to open a given filedescriptor */ |