]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Even though it was probably safe, its more correct to have the
authorwessels <>
Sat, 2 Dec 2000 00:41:26 +0000 (00:41 +0000)
committerwessels <>
Sat, 2 Dec 2000 00:41:26 +0000 (00:41 +0000)
assert() before this assignment, rather than after it.

src/fd.cc

index c2a2af85fa8259ffaf5d31ae02c2a16fc32c4515..16485396ff1b08c86e03aaaff89d5e7a3baa0367 100644 (file)
--- 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);