diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-05 14:52:01 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-05 14:52:01 (GMT) |
commit | 2501ad1ea2dd8592c15e7f3bda1f9c298fa446a6 (patch) | |
tree | 8b3fcee2d834673ca87d7d3ccf003f43591ccfaf /generic/tclObj.c | |
parent | e9e3981faf0495befa4c2914d59af0bd994ac23c (diff) | |
download | tcl-2501ad1ea2dd8592c15e7f3bda1f9c298fa446a6.zip tcl-2501ad1ea2dd8592c15e7f3bda1f9c298fa446a6.tar.gz tcl-2501ad1ea2dd8592c15e7f3bda1f9c298fa446a6.tar.bz2 |
some more clean-up
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index 661ab48..283c8d2 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -4219,10 +4219,10 @@ TclSetCmdNameObj( const char *name; if (objPtr->typePtr == &tclCmdNameType) { - resPtr = objPtr->internalRep.twoPtrValue.ptr1; - if (resPtr->cmdPtr == cmdPtr) { - return; - } + resPtr = objPtr->internalRep.twoPtrValue.ptr1; + if (resPtr->cmdPtr == cmdPtr) { + return; + } } cmdPtr->refCount++; @@ -4400,9 +4400,7 @@ SetCmdNameFromAny( cmdPtr->refCount++; resPtr = objPtr->internalRep.twoPtrValue.ptr1; if ((objPtr->typePtr == &tclCmdNameType) - && resPtr != NULL - && (resPtr->refCount == 1) - ) { + && resPtr && (resPtr->refCount == 1)) { /* * Reuse the old ResolvedCmdName struct instead of freeing it */ |