From: wessels <> Date: Sat, 2 Dec 2000 00:41:26 +0000 (+0000) Subject: Even though it was probably safe, its more correct to have the X-Git-Tag: SQUID_3_0_PRE1~1750 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bc3a4cd40d9024b44f0f2a279ff60ebc597929c;p=thirdparty%2Fsquid.git Even though it was probably safe, its more correct to have the assert() before this assignment, rather than after it. --- diff --git a/src/fd.cc b/src/fd.cc index c2a2af85fa..16485396ff 100644 --- a/src/fd.cc +++ b/src/fd.cc @@ -1,6 +1,6 @@ /* - * $Id: fd.cc,v 1.39 2000/05/03 17:15:42 adrian Exp $ + * $Id: fd.cc,v 1.40 2000/12/01 17:41:26 wessels Exp $ * * DEBUG: section 51 Filedescriptor Functions * AUTHOR: Duane Wessels @@ -93,8 +93,9 @@ fd_close(int fd) void fd_open(int fd, unsigned int type, const char *desc) { - fde *F = &fd_table[fd]; + fde *F; assert(fd >= 0); + F = &fd_table[fd]; if (F->flags.open) { debug(51, 1) ("WARNING: Closing open FD %4d\n", fd); fd_close(fd);