diff options
author | dkf <dkf@noemail.net> | 2012-03-07 14:30:58 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2012-03-07 14:30:58 (GMT) |
commit | d37630fc417f9b5754422cf312c561a5a6f0380e (patch) | |
tree | c424e4e080a680ca9c48011b3b24ef02cbae05d1 /generic | |
parent | 9b36fa71170c445ee91a8c912d650d1f50ffb277 (diff) | |
parent | 82ffd7a121f6af490564992c81659d1a6134f7a4 (diff) | |
download | tk-d37630fc417f9b5754422cf312c561a5a6f0380e.zip tk-d37630fc417f9b5754422cf312c561a5a6f0380e.tar.gz tk-d37630fc417f9b5754422cf312c561a5a6f0380e.tar.bz2 |
Minor: code style improvements.
FossilOrigin-Name: 07ed48038615cdb2a2539da0a28258446c8092d4
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkObj.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tkObj.c b/generic/tkObj.c index 2e45e0e..8877d42 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -368,10 +368,9 @@ static void FreePixelInternalRep( Tcl_Obj *objPtr) /* Pixel object with internal rep to free. */ { - PixelRep *pixelPtr; - if (!SIMPLE_PIXELREP(objPtr)) { - pixelPtr = GET_COMPLEXPIXEL(objPtr); + PixelRep *pixelPtr = GET_COMPLEXPIXEL(objPtr); + ckfree(pixelPtr); } SET_SIMPLEPIXEL(objPtr, 0); @@ -401,13 +400,13 @@ DupPixelInternalRep( register Tcl_Obj *srcPtr, /* Object with internal rep to copy. */ register Tcl_Obj *copyPtr) /* Object with internal rep to set. */ { - PixelRep *oldPtr, *newPtr; - copyPtr->typePtr = srcPtr->typePtr; if (SIMPLE_PIXELREP(srcPtr)) { SET_SIMPLEPIXEL(copyPtr, GET_SIMPLEPIXEL(srcPtr)); } else { + PixelRep *oldPtr, *newPtr; + oldPtr = GET_COMPLEXPIXEL(srcPtr); newPtr = ckalloc(sizeof(PixelRep)); newPtr->value = oldPtr->value; |