From 23f46a304464683d61975cfe1622a61b52b2d86a Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Feb 2009 21:04:05 +0000 Subject: Removed handling of (objPtr->bytes != NULL) from UpdateStringOfString, which is only called when objPtr->bytes is NULL. --- ChangeLog | 2 ++ generic/tclStringObj.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c05dd16..f3978af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ Simplify Tcl_AttemptSetObjLength by removing unreachable code. Simplify SetStringFromAny() by removing unreachable and duplicate code. Simplify Tcl_SetObjLength by removing unreachable code. + Removed handling of (objPtr->bytes != NULL) from UpdateStringOfString, + which is only called when objPtr->bytes is NULL. 2009-02-09 Jan Nijtmans diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 940e6d1..2d2622c 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.93 2009/02/10 17:37:35 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.94 2009/02/10 21:04:06 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2888,7 +2888,6 @@ UpdateStringOfString( String *stringPtr; stringPtr = GET_STRING(objPtr); - if ((objPtr->bytes == NULL) || (stringPtr->allocated == 0)) { if (stringPtr->numChars <= 0) { /* * If there is no Unicode rep, or the string has 0 chars, then set @@ -2921,7 +2920,6 @@ UpdateStringOfString( dst += Tcl_UniCharToUtf(unicode[i], dst); } *dst = '\0'; - } return; } -- cgit v0.12