diff options
author | Denys Vlasenko | 2021-11-27 15:00:14 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-11-27 15:00:14 +0100 |
commit | 26c85225229b0a439bcc66c8ee786d16f23be9ed (patch) | |
tree | 9940dab3bf2a46f7de20d189eb361bdbbd08a42a | |
parent | 446d136109633c12d748d63e2034db238f77ef97 (diff) | |
download | busybox-26c85225229b0a439bcc66c8ee786d16f23be9ed.zip busybox-26c85225229b0a439bcc66c8ee786d16f23be9ed.tar.gz |
tls: P256: do not open-code copying of struct variables
function old new delta
sp_256_ecc_mulmod_8 536 534 -2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/tls_sp_c32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/tls_sp_c32.c b/networking/tls_sp_c32.c index d09f7e8..29dd042 100644 --- a/networking/tls_sp_c32.c +++ b/networking/tls_sp_c32.c @@ -1361,13 +1361,13 @@ static void sp_256_ecc_mulmod_8(sp_point* r, const sp_point* g, const sp_digit* dump_512("t[1].y %s\n", t[1].y); dump_512("t[1].z %s\n", t[1].z); dbg("t[2] = t[%d]\n", y); - memcpy(&t[2], &t[y], sizeof(sp_point)); + t[2] = t[y]; /* struct copy */ dbg("t[2] *= 2\n"); sp_256_proj_point_dbl_8(&t[2], &t[2]); dump_512("t[2].x %s\n", t[2].x); dump_512("t[2].y %s\n", t[2].y); dump_512("t[2].z %s\n", t[2].z); - memcpy(&t[y], &t[2], sizeof(sp_point)); + t[y] = t[2]; /* struct copy */ n <<= 1; c--; |