diff options
author | Gerald Carter <jerry@samba.org> | 2000-08-05 19:03:00 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2000-08-05 19:03:00 +0000 |
commit | cfb5d7d84c63d2b13e9d756a1c31b07a88c21e3f (patch) | |
tree | c8aae76598cce8840c3bbe63aea907b33a0fcfdc /source3 | |
parent | 139dcbb0bfcf648f18646dcbf0b7b4281c5d4490 (diff) | |
download | samba-cfb5d7d84c63d2b13e9d756a1c31b07a88c21e3f.tar.gz samba-cfb5d7d84c63d2b13e9d756a1c31b07a88c21e3f.tar.bz2 samba-cfb5d7d84c63d2b13e9d756a1c31b07a88c21e3f.zip |
removed the for() loop to copy the buffer in init_unistr2_from_unistr()
Replaced with a memcpy()
Forgot to commit this a few moments ago
j-
(This used to be commit 34d4fb54c3121d31cb8b29193f71d5e7b5471cdc)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index 73ea4b10d2..1cc072b7b5 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -906,13 +906,12 @@ void init_unistr2_from_unistr (UNISTR2 *to, UNISTR *from) if (!parse_misc_talloc) parse_misc_talloc = talloc_init(); + /* copy the string now */ to->buffer = (uint16 *)talloc(parse_misc_talloc, sizeof(uint16)*(to->uni_str_len)); if (to->buffer == NULL) smb_panic("init_unistr2_from_unistr: malloc fail\n"); - for (i=0; i < to->uni_str_len; i++) - to->buffer[i] = from->buffer[i]; - + memcpy( to->buffer, from->buffer, to->uni_str_len*sizeof(uint16) ); return; } |