diff --git a/crypto/asn1/a_int.c b/crypto/asn1/a_int.c index dc962290dd..7d5dd85fc0 100644 --- a/crypto/asn1/a_int.c +++ b/crypto/asn1/a_int.c @@ -265,7 +265,7 @@ static int asn1_get_int64(int64_t *pr, const unsigned char *b, size_t blen, *pr = -(int64_t)r; } else if (r == ABS_INT64_MIN) { /* This never happens if INT64_MAX == ABS_INT64_MIN, e.g. - * on ones'-complement system. */ + * on ones' complement system. */ *pr = (int64_t)(0 - r); } else { ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL); @@ -347,8 +347,8 @@ static int asn1_string_set_int64(ASN1_STRING *a, int64_t r, int itype) if (r < 0) { /* Most obvious '-r' triggers undefined behaviour for most * common INT64_MIN. Even though below '0 - (uint64_t)r' can - * appear two's-complement centric, it does produce correct/ - * expected result even on one's-complement. This is because + * appear two's complement centric, it does produce correct/ + * expected result even on ones' complement. This is because * cast to unsigned has to change bit pattern... */ off = asn1_put_uint64(tbuf, 0 - (uint64_t)r); a->type |= V_ASN1_NEG; diff --git a/crypto/modes/siv128.c b/crypto/modes/siv128.c index e6348a8d37..19bc515852 100644 --- a/crypto/modes/siv128.c +++ b/crypto/modes/siv128.c @@ -69,7 +69,7 @@ static ossl_inline void siv128_xorblock(SIV_BLOCK *x, * Doubles |b|, which is 16 bytes representing an element * of GF(2**128) modulo the irreducible polynomial * x**128 + x**7 + x**2 + x + 1. - * Assumes two's-complement arithmetic + * Assumes two's complement arithmetic */ static ossl_inline void siv128_dbl(SIV_BLOCK *b) { diff --git a/include/internal/numbers.h b/include/internal/numbers.h index 47fb167709..4a93a24756 100644 --- a/include/internal/numbers.h +++ b/include/internal/numbers.h @@ -19,7 +19,7 @@ # define __MAXINT__(T) ((T) ((((T) 1) << ((sizeof(T) * CHAR_BIT) - 1)) ^ __MAXUINT__(T))) # define __MININT__(T) (-__MAXINT__(T) - 1) -# elif (-1 & 3) == 0x02 /* One's complement */ +# elif (-1 & 3) == 0x02 /* Ones' complement */ # define __MAXUINT__(T) (((T) -1) + 1) # define __MAXINT__(T) ((T) ((((T) 1) << ((sizeof(T) * CHAR_BIT) - 1)) ^ __MAXUINT__(T))) diff --git a/include/internal/sockets.h b/include/internal/sockets.h index 11e21508fe..d10ef67cc1 100644 --- a/include/internal/sockets.h +++ b/include/internal/sockets.h @@ -54,7 +54,7 @@ struct servent *PASCAL getservbyname(const char *, const char *); * Even though sizeof(SOCKET) is 8, it's safe to cast it to int, because * the value constitutes an index in per-process table of limited size * and not a real pointer. And we also depend on fact that all processors - * Windows run on happen to be two's-complement, which allows to + * Windows run on happen to be two's complement, which allows to * interchange INVALID_SOCKET and -1. */ # define socket(d,t,p) ((int)socket(d,t,p)) diff --git a/providers/implementations/kdfs/krb5kdf.c b/providers/implementations/kdfs/krb5kdf.c index 719b45415c..07f14b4282 100644 --- a/providers/implementations/kdfs/krb5kdf.c +++ b/providers/implementations/kdfs/krb5kdf.c @@ -275,7 +275,7 @@ static int fixup_des3_key(unsigned char *key) * * block = 0 * for k: 1 -> K - * block += s[N(k-1)..(N-1)k] (one's complement addition) + * block += s[N(k-1)..(N-1)k] (ones' complement addition) * * Optimizing for space we compute: * for each l in L-1 -> 0: diff --git a/test/bioprinttest.c b/test/bioprinttest.c index ff5e8a05a7..5ac5025c40 100644 --- a/test/bioprinttest.c +++ b/test/bioprinttest.c @@ -149,7 +149,7 @@ static j_data jf_data[] = { { 0xffffffffffffffffULL, "%jx", "ffffffffffffffff" }, { 0x8000000000000000ULL, "%ju", "9223372036854775808" }, /* - * These tests imply two's-complement, but it's the only binary + * These tests imply two's complement, but it's the only binary * representation we support, see test/sanitytest.c... */ { 0x8000000000000000ULL, "%ji", "-9223372036854775808" },