[openssh-commits] [openssh] 01/02: upstream: Replace u_intXX_t types with the equivalent C99 uintXX_t
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Mar 6 18:32:07 AEDT 2026
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 2df416dff1a1d5fb31598b7ce8fb5cb6b0f64fd3
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Fri Mar 6 06:57:33 2026 +0000
upstream: Replace u_intXX_t types with the equivalent C99 uintXX_t
types to match similar change to the main ssh code.
OpenBSD-Regress-ID: a62b6499f784f75a4fcb865aebb83f5936917a91
---
regress/modpipe.c | 4 ++--
regress/unittests/sshbuf/test_sshbuf_fuzz.c | 4 ++--
regress/unittests/sshbuf/test_sshbuf_getput_basic.c | 8 ++++----
regress/unittests/sshbuf/test_sshbuf_getput_crypto.c | 6 +++---
regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c | 10 +++++-----
regress/unittests/sshkey/test_sshkey.c | 4 ++--
regress/unittests/test_helper/test_helper.c | 12 ++++++------
regress/unittests/test_helper/test_helper.h | 10 +++++-----
8 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/regress/modpipe.c b/regress/modpipe.c
index 5ef2f12ed..49cbedd48 100644
--- a/regress/modpipe.c
+++ b/regress/modpipe.c
@@ -14,7 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $OpenBSD: modpipe.c,v 1.7 2025/10/03 01:03:45 dtucker Exp $ */
+/* $OpenBSD: modpipe.c,v 1.8 2026/03/06 06:57:33 dtucker Exp $ */
#include "includes.h"
@@ -44,7 +44,7 @@ usage(void)
struct modification {
enum { MOD_XOR, MOD_AND_OR } what;
unsigned long long offset;
- u_int8_t m1, m2;
+ uint8_t m1, m2;
};
static void
diff --git a/regress/unittests/sshbuf/test_sshbuf_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_fuzz.c
index 51838ee72..0d8083035 100644
--- a/regress/unittests/sshbuf/test_sshbuf_fuzz.c
+++ b/regress/unittests/sshbuf/test_sshbuf_fuzz.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_sshbuf_fuzz.c,v 1.4 2021/12/18 06:53:59 anton Exp $ */
+/* $OpenBSD: test_sshbuf_fuzz.c,v 1.5 2026/03/06 06:57:33 dtucker Exp $ */
/*
* Regress test for sshbuf.h buffer API
*
@@ -28,7 +28,7 @@ sshbuf_fuzz_tests(void)
struct sshbuf *p1;
u_char *dp;
size_t sz, sz2, i, ntests = NUM_FUZZ_TESTS;
- u_int32_t r;
+ uint32_t r;
int ret;
if (test_is_fast())
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_basic.c b/regress/unittests/sshbuf/test_sshbuf_getput_basic.c
index d9ed194b0..1e479a41b 100644
--- a/regress/unittests/sshbuf/test_sshbuf_getput_basic.c
+++ b/regress/unittests/sshbuf/test_sshbuf_getput_basic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_sshbuf_getput_basic.c,v 1.6 2025/11/21 01:29:27 djm Exp $ */
+/* $OpenBSD: test_sshbuf_getput_basic.c,v 1.7 2026/03/06 06:57:33 dtucker Exp $ */
/*
* Regress test for sshbuf.h buffer API
*
@@ -27,9 +27,9 @@ sshbuf_getput_basic_tests(void)
u_char *d, d2[32], x[] = {
0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x00, 0x99
};
- u_int64_t v64;
- u_int32_t v32;
- u_int16_t v16;
+ uint64_t v64;
+ uint32_t v32;
+ uint16_t v16;
u_char v8;
size_t s;
char *s2;
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
index 97ee853d8..1d83ffd88 100644
--- a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
+++ b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_sshbuf_getput_crypto.c,v 1.4 2025/05/12 05:42:02 tb Exp $ */
+/* $OpenBSD: test_sshbuf_getput_crypto.c,v 1.5 2026/03/06 06:57:33 dtucker Exp $ */
/*
* Regress test for sshbuf.h buffer API
*
@@ -82,7 +82,7 @@ sshbuf_getput_crypto_tests(void)
ASSERT_PTR_NE(p1, NULL);
ASSERT_INT_EQ(sshbuf_put_bignum2(p1, bn), 0);
ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn1) + 4);
- ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (u_int32_t)BN_num_bytes(bn));
+ ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (uint32_t)BN_num_bytes(bn));
ASSERT_MEM_EQ(sshbuf_ptr(p1) + 4, expbn1, sizeof(expbn1));
BN_free(bn);
sshbuf_free(p1);
@@ -106,7 +106,7 @@ sshbuf_getput_crypto_tests(void)
ASSERT_PTR_NE(p1, NULL);
ASSERT_INT_EQ(sshbuf_put_bignum2(p1, bn), 0);
ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn2) + 4 + 1); /* MSB */
- ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (u_int32_t)BN_num_bytes(bn) + 1);
+ ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (uint32_t)BN_num_bytes(bn) + 1);
ASSERT_U8_EQ(*(sshbuf_ptr(p1) + 4), 0x00);
ASSERT_MEM_EQ(sshbuf_ptr(p1) + 5, expbn2, sizeof(expbn2));
BN_free(bn);
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c
index cd712c62b..7b2ffced3 100644
--- a/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c
+++ b/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_sshbuf_getput_fuzz.c,v 1.6 2025/09/25 22:17:29 dtucker Exp $ */
+/* $OpenBSD: test_sshbuf_getput_fuzz.c,v 1.7 2026/03/06 06:57:33 dtucker Exp $ */
/*
* Regress test for sshbuf.h buffer API
*
@@ -39,10 +39,10 @@ attempt_parse_blob(u_char *blob, size_t len)
#endif /* WITH_OPENSSL */
u_char *s;
size_t l;
- u_int8_t u8;
- u_int16_t u16;
- u_int32_t u32;
- u_int64_t u64;
+ uint8_t u8;
+ uint16_t u16;
+ uint32_t u32;
+ uint64_t u64;
p1 = sshbuf_new();
ASSERT_PTR_NE(p1, NULL);
diff --git a/regress/unittests/sshkey/test_sshkey.c b/regress/unittests/sshkey/test_sshkey.c
index d0c46a90b..1701c87c5 100644
--- a/regress/unittests/sshkey/test_sshkey.c
+++ b/regress/unittests/sshkey/test_sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_sshkey.c,v 1.32 2025/10/01 00:33:37 dtucker Exp $ */
+/* $OpenBSD: test_sshkey.c,v 1.33 2026/03/06 06:57:33 dtucker Exp $ */
/*
* Regress test for sshkey.h key management API
*
@@ -466,7 +466,7 @@ sshkey_tests(void)
ASSERT_PTR_NE(k1->cert->principals[3], NULL);
k1->cert->nprincipals = 4;
k1->cert->valid_after = 0;
- k1->cert->valid_before = (u_int64_t)-1;
+ k1->cert->valid_before = (uint64_t)-1;
sshbuf_free(k1->cert->critical);
k1->cert->critical = sshbuf_new();
ASSERT_PTR_NE(k1->cert->critical, NULL);
diff --git a/regress/unittests/test_helper/test_helper.c b/regress/unittests/test_helper/test_helper.c
index 15d7a0063..525a82b1f 100644
--- a/regress/unittests/test_helper/test_helper.c
+++ b/regress/unittests/test_helper/test_helper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_helper.c,v 1.15 2025/12/05 11:13:35 djm Exp $ */
+/* $OpenBSD: test_helper.c,v 1.16 2026/03/06 06:57:33 dtucker Exp $ */
/*
* Copyright (c) 2011 Damien Miller <djm at mindrot.org>
*
@@ -448,7 +448,7 @@ assert_mem(const char *file, int line, const char *a1, const char *a2,
}
static int
-memvalcmp(const u_int8_t *s, u_char v, size_t l, size_t *where)
+memvalcmp(const uint8_t *s, u_char v, size_t l, size_t *where)
{
size_t i;
@@ -560,7 +560,7 @@ assert_char(const char *file, int line, const char *a1, const char *a2,
void
assert_u8(const char *file, int line, const char *a1, const char *a2,
- u_int8_t aa1, u_int8_t aa2, enum test_predicate pred)
+ uint8_t aa1, uint8_t aa2, enum test_predicate pred)
{
TEST_CHECK(aa1, aa2, pred);
test_header(file, line, a1, a2, "U8", pred);
@@ -571,7 +571,7 @@ assert_u8(const char *file, int line, const char *a1, const char *a2,
void
assert_u16(const char *file, int line, const char *a1, const char *a2,
- u_int16_t aa1, u_int16_t aa2, enum test_predicate pred)
+ uint16_t aa1, uint16_t aa2, enum test_predicate pred)
{
TEST_CHECK(aa1, aa2, pred);
test_header(file, line, a1, a2, "U16", pred);
@@ -582,7 +582,7 @@ assert_u16(const char *file, int line, const char *a1, const char *a2,
void
assert_u32(const char *file, int line, const char *a1, const char *a2,
- u_int32_t aa1, u_int32_t aa2, enum test_predicate pred)
+ uint32_t aa1, uint32_t aa2, enum test_predicate pred)
{
TEST_CHECK(aa1, aa2, pred);
test_header(file, line, a1, a2, "U32", pred);
@@ -593,7 +593,7 @@ assert_u32(const char *file, int line, const char *a1, const char *a2,
void
assert_u64(const char *file, int line, const char *a1, const char *a2,
- u_int64_t aa1, u_int64_t aa2, enum test_predicate pred)
+ uint64_t aa1, uint64_t aa2, enum test_predicate pred)
{
TEST_CHECK(aa1, aa2, pred);
test_header(file, line, a1, a2, "U64", pred);
diff --git a/regress/unittests/test_helper/test_helper.h b/regress/unittests/test_helper/test_helper.h
index 215513a06..91fdca435 100644
--- a/regress/unittests/test_helper/test_helper.h
+++ b/regress/unittests/test_helper/test_helper.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_helper.h,v 1.11 2025/12/05 11:13:35 djm Exp $ */
+/* $OpenBSD: test_helper.h,v 1.12 2026/03/06 06:57:33 dtucker Exp $ */
/*
* Copyright (c) 2011 Damien Miller <djm at mindrot.org>
*
@@ -89,16 +89,16 @@ void assert_ptr(const char *file, int line,
const void *aa1, const void *aa2, enum test_predicate pred);
void assert_u8(const char *file, int line,
const char *a1, const char *a2,
- u_int8_t aa1, u_int8_t aa2, enum test_predicate pred);
+ uint8_t aa1, uint8_t aa2, enum test_predicate pred);
void assert_u16(const char *file, int line,
const char *a1, const char *a2,
- u_int16_t aa1, u_int16_t aa2, enum test_predicate pred);
+ uint16_t aa1, uint16_t aa2, enum test_predicate pred);
void assert_u32(const char *file, int line,
const char *a1, const char *a2,
- u_int32_t aa1, u_int32_t aa2, enum test_predicate pred);
+ uint32_t aa1, uint32_t aa2, enum test_predicate pred);
void assert_u64(const char *file, int line,
const char *a1, const char *a2,
- u_int64_t aa1, u_int64_t aa2, enum test_predicate pred);
+ uint64_t aa1, uint64_t aa2, enum test_predicate pred);
void assert_double(const char *file, int line,
const char *a1, const char *a2,
double aa1, double aa2, enum test_predicate pred);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list