summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-05 14:52:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-05 14:52:01 (GMT)
commit2501ad1ea2dd8592c15e7f3bda1f9c298fa446a6 (patch)
tree8b3fcee2d834673ca87d7d3ccf003f43591ccfaf /generic/tclObj.c
parente9e3981faf0495befa4c2914d59af0bd994ac23c (diff)
downloadtcl-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.c12
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
*/