diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-04-19 15:16:51 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-04-19 15:16:51 -0700 |
commit | 0b443c1b769b9c9a3b45b4252afe07e18b709ff4 (patch) | |
tree | 924d4207a0bdc75ecc3078c39e5c5ee55d566315 | |
parent | 1222f974442f3d419664be4faca576f5f1457666 (diff) |
Make XdmcpCopyARRAY8 call XdmcpAllocARRAY8 instead of replicating it
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | Array.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -145,12 +145,8 @@ XdmcpARRAY8Equal (const ARRAY8Ptr array1, const ARRAY8Ptr array2) int XdmcpCopyARRAY8 (const ARRAY8Ptr src, ARRAY8Ptr dst) { - dst->data = (CARD8 *) xmalloc(src->length * sizeof (CARD8)); - if (!dst->data) { - dst->length = 0; + if (!XdmcpAllocARRAY8(dst, src->length)) return FALSE; - } - dst->length = src->length; memmove (dst->data, src->data, src->length * sizeof (CARD8)); return TRUE; } |