From: Vsevolod Stakhov Date: Mon, 3 Apr 2017 12:30:29 +0000 (+0100) Subject: [Minor] Use memcpy X-Git-Tag: 1.5.5~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7641f747f2afc07bb5846ac32adf62250f6e7e28;p=rspamd.git [Minor] Use memcpy --- diff --git a/src/libutil/shingles.c b/src/libutil/shingles.c index 236e8113a..2dd7faffc 100644 --- a/src/libutil/shingles.c +++ b/src/libutil/shingles.c @@ -68,10 +68,7 @@ rspamd_shingles_from_text (GArray *input, rspamd_cryptobox_hash_update (&bs, cur_key, 16); rspamd_cryptobox_hash_final (&bs, shabuf); - for (j = 0; j < 16; j ++) { - out_key[j] = shabuf[j]; - } - + memcpy (out_key, shabuf, 16); rspamd_cryptobox_hash_init (&bs, NULL, 0); cur_key = out_key; out_key += 16;