From 7641f747f2afc07bb5846ac32adf62250f6e7e28 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 3 Apr 2017 13:30:29 +0100 Subject: [PATCH] [Minor] Use memcpy --- src/libutil/shingles.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; -- 2.39.5