Module Name: src Committed By: andvar Date: Mon Feb 27 22:00:25 UTC 2023
Modified Files: src/sbin/nvmectl: bignum.c Log Message: fix some typos in comments. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sbin/nvmectl/bignum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/nvmectl/bignum.c diff -u src/sbin/nvmectl/bignum.c:1.5 src/sbin/nvmectl/bignum.c:1.6 --- src/sbin/nvmectl/bignum.c:1.5 Tue May 24 06:27:59 2022 +++ src/sbin/nvmectl/bignum.c Mon Feb 27 22:00:25 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bignum.c,v 1.5 2022/05/24 06:27:59 andvar Exp $ */ +/* $NetBSD: bignum.c,v 1.6 2023/02/27 22:00:25 andvar Exp $ */ /*- * Copyright (c) 2012 Alistair Crooks <a...@netbsd.org> @@ -196,7 +196,7 @@ lshift_digits(mp_int * a, int b) /* trim unused digits * * This is used to ensure that leading zero digits are - * trimed and the leading "used" digit will be non-zero + * trimmed and the leading "used" digit will be non-zero * Typically very fast. Also fixes the sign if there * are no more leading digits */ @@ -363,7 +363,7 @@ mp_count_bits(const mp_int *a) return r; } -/* compare maginitude of two ints (unsigned) */ +/* compare magnitude of two ints (unsigned) */ static int compare_magnitude(mp_int * a, mp_int * b) { @@ -2086,7 +2086,7 @@ ERR: * are saved. Note also that the call to signed_multiply can end up back * in this function if the a0, a1, b0, or b1 are above the threshold. * This is known as divide-and-conquer and leads to the famous - * O(N**lg(3)) or O(N**1.584) work which is asymptopically lower than + * O(N**lg(3)) or O(N**1.584) work which is asymptotically lower than * the standard O(N**2) that the baseline/comba methods use. * Generally though the overhead of this method doesn't pay off * until a certain size (N ~ 80) is reached. @@ -2277,7 +2277,7 @@ fast_col_array_multiply(mp_int * a, mp_i tmpx = a->dp + tx; tmpy = b->dp + ty; - /* this is the number of times the loop will iterrate, essentially + /* this is the number of times the loop will iterate, essentially while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); @@ -2472,7 +2472,7 @@ fast_basic_multiply_partial_upper(mp_int tmpx = a->dp + tx; tmpy = b->dp + ty; - /* this is the number of times the loop will iterrate, essentially its + /* this is the number of times the loop will iterate, essentially its while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); @@ -3078,7 +3078,7 @@ fast_basic_square(mp_int * a, mp_int * b tmpx = a->dp + tx; tmpy = a->dp + ty; - /* this is the number of times the loop will iterrate, essentially + /* this is the number of times the loop will iterate, essentially while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); @@ -4004,7 +4004,7 @@ ERR: * shifts with subtractions when the result is greater than b. * * The method is slightly modified to shift B unconditionally upto just under - * the leading bit of b. This saves alot of multiple precision shifting. + * the leading bit of b. This saves a lot of multiple precision shifting. */ static int mp_montgomery_calc_normalization(mp_int * a, mp_int * b) @@ -4295,7 +4295,7 @@ LBL_M: /* this is a shell function that calls either the normal or Montgomery * exptmod functions. Originally the call to the montgomery code was - * embedded in the normal function but that wasted alot of stack space + * embedded in the normal function but that wasted a lot of stack space * for nothing (since 99% of the time the Montgomery code would be called) */ static int @@ -4346,7 +4346,7 @@ exponent_modulo(mp_int * G, mp_int * X, /* is it a DR modulus? */ diminished_radix = is_diminished_radix_modulus(P); - /* if not, is it a unrestricted DR modulus? */ + /* if not, is it an unrestricted DR modulus? */ if (!diminished_radix) { diminished_radix = mp_reduce_is_2k(P) << 1; } @@ -4892,7 +4892,7 @@ LBL_B: return err; } -/* returns size of ASCII reprensentation */ +/* returns size of ASCII representation */ static int mp_radix_size(mp_int *a, int radix, int *size) { @@ -5008,7 +5008,7 @@ mp_toradix_n(mp_int * a, char *str, int } /* reverse the digits of the string. In this case _s points - * to the first digit [exluding the sign] of the number + * to the first digit [excluding the sign] of the number */ bn_reverse((unsigned char *)_s, digs); @@ -5209,7 +5209,7 @@ LBL_U: /* BIGNUM emulation layer */ -/* essentiually, these are just wrappers around the libtommath functions */ +/* essentially, these are just wrappers around the libtommath functions */ /* usually the order of args changes */ /* the BIGNUM API tends to have more const poisoning */ /* these wrappers also check the arguments passed for sanity */