From: Amos Jeffries Date: Sat, 9 Oct 2010 12:28:51 +0000 (+1300) Subject: consistently assert correct FD state before opening/closing X-Git-Tag: take08~55^2~124^2~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78611e17643113b6785b6b8fb7df7573f6865308;p=thirdparty%2Fsquid.git consistently assert correct FD state before opening/closing --- diff --git a/src/fd.cc b/src/fd.cc index e895d9c1f4..74ca6c958e 100644 --- a/src/fd.cc +++ b/src/fd.cc @@ -104,6 +104,9 @@ fd_close(int fd) { fde *F = &fd_table[fd]; + assert(fd >= 0); + assert(F->flags.open == 1); + if (F->type == FD_FILE) { assert(F->read_handler == NULL); assert(F->write_handler == NULL);