summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorstwo <stwo>2012-09-16 15:51:55 (GMT)
committerstwo <stwo>2012-09-16 15:51:55 (GMT)
commit0807baacce4a33e3515110feb33689c90b397f80 (patch)
treedea30e5ade8cbefcc5ddfa6fea1ded345b13976b /generic
parent18b6945d86ecf2b58a0d39e7f17885f692f19a87 (diff)
downloadtcl-0807baacce4a33e3515110feb33689c90b397f80.zip
tcl-0807baacce4a33e3515110feb33689c90b397f80.tar.gz
tcl-0807baacce4a33e3515110feb33689c90b397f80.tar.bz2
Nicer style test.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBinary.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 4953e27..cbd9b02 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -309,10 +309,10 @@ Tcl_SetByteArrayObj(
byteArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
byteArrayPtr->used = length;
byteArrayPtr->allocated = length;
- if (length && bytes) {
+
+ if ((length != NULL) && (bytes > 0)) {
memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
}
-
objPtr->typePtr = &tclByteArrayType;
SET_BYTEARRAY(objPtr, byteArrayPtr);
}