summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index c4d9171..67c9c3f 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -2313,7 +2313,7 @@ PreserveChannelBuffer(
ChannelBuffer *bufPtr)
{
if (bufPtr->refCount == 0) {
- Tcl_Panic("Reuse of ChannelBuffer!");
+ Tcl_Panic("Reuse of ChannelBuffer! %p", bufPtr);
}
bufPtr->refCount++;
}
@@ -2703,9 +2703,7 @@ FlushChannel(
wroteSome = 1;
}
- if (!IsBufferEmpty(bufPtr)) {
- bufPtr->nextRemoved += written;
- }
+ bufPtr->nextRemoved += written;
/*
* If this buffer is now empty, recycle it.
@@ -2717,11 +2715,8 @@ FlushChannel(
statePtr->outQueueTail = NULL;
}
RecycleBuffer(statePtr, bufPtr, 0);
- bufPtr = NULL;
- }
- if (bufPtr) {
- ReleaseChannelBuffer(bufPtr);
}
+ ReleaseChannelBuffer(bufPtr);
} /* Closes "while (1)". */
/*