summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-11-11 19:53:20 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-11-11 19:53:20 (GMT)
commit094b6f7ae513ec561543276d7659f3a8b2a5b853 (patch)
tree4f13f59921f5907917d22afa015155b67318e183
parente811f452678383f5d77a7848bef5d10c62d62925 (diff)
downloadtcl-094b6f7ae513ec561543276d7659f3a8b2a5b853.zip
tcl-094b6f7ae513ec561543276d7659f3a8b2a5b853.tar.gz
tcl-094b6f7ae513ec561543276d7659f3a8b2a5b853.tar.bz2
* generic/tclResult.c (ResetObjResult): clarify the logic.
-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);
}