summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--generic/tclResult.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 355fe15..5e8bffb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2007-11-10 Miguel Sofer <msofer@users.sf.net>
+ * generic/tclResult.c (ResetObjResult): clarify the logic.
+
* generic/tclBasic.c: Increased usage of macros to detect
* generic/tclBinary.c: and take advantage of objTypes. Added
* generic/tclClock.c: macros TclGet(Int|Long)FromObj,
diff --git a/generic/tclResult.c b/generic/tclResult.c
index c68c155..3d432df 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclResult.c,v 1.41 2007/11/11 19:32:17 msofer Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.42 2007/11/11 19:53:20 msofer Exp $
*/
#include "tclInt.h"
@@ -961,9 +961,7 @@ ResetObjResult(
TclNewObj(objResultPtr);
Tcl_IncrRefCount(objResultPtr);
iPtr->objResultPtr = objResultPtr;
- } else if (objResultPtr->bytes == tclEmptyStringRep) {
- return;
- } else {
+ } else if (objResultPtr->bytes != tclEmptyStringRep) {
if (objResultPtr->bytes != NULL) {
ckfree((char *) objResultPtr->bytes);
}