diff options
author | stwo <stwo> | 2012-09-16 15:56:02 (GMT) |
---|---|---|
committer | stwo <stwo> | 2012-09-16 15:56:02 (GMT) |
commit | 4cbd189c26149481fffd935920221b8e3a0c7b2e (patch) | |
tree | 1e582d8fef984892f52d67c874aa0294faf872b5 /generic | |
parent | a691e3e94617652a15c76afc630e9869cd7ae6cd (diff) | |
download | tcl-4cbd189c26149481fffd935920221b8e3a0c7b2e.zip tcl-4cbd189c26149481fffd935920221b8e3a0c7b2e.tar.gz tcl-4cbd189c26149481fffd935920221b8e3a0c7b2e.tar.bz2 |
Nicer style test.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBinary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 8c95305..d3b11d3 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -279,10 +279,10 @@ Tcl_SetByteArrayObj( byteArrayPtr = (ByteArray *) 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); } |