]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use memcpy
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 3 Apr 2017 12:30:29 +0000 (13:30 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 3 Apr 2017 12:30:29 +0000 (13:30 +0100)
src/libutil/shingles.c

index 236e8113aeb191a4c285248334abd89246f9658d..2dd7faffc15d7f9f7485597fef45b8aa1cc5f5aa 100644 (file)
@@ -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;