mirror of
https://github.com/openbsd/src.git
synced 2026-06-18 23:33:33 +02:00
Replace u_intXX_t types with the equivalent C99 uintXX_t types to match
similar change to the main ssh code.
This commit is contained in:
@@ -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 <sys/types.h>
|
||||
#include <unistd.h>
|
||||
@@ -38,7 +38,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
|
||||
|
||||
@@ -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
|
||||
*
|
||||
@@ -26,7 +26,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())
|
||||
|
||||
@@ -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
|
||||
*
|
||||
@@ -25,9 +25,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;
|
||||
|
||||
@@ -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
|
||||
*
|
||||
@@ -72,7 +72,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);
|
||||
@@ -96,7 +96,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);
|
||||
|
||||
@@ -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
|
||||
*
|
||||
@@ -29,10 +29,10 @@ attempt_parse_blob(u_char *blob, size_t len)
|
||||
EC_KEY *eck;
|
||||
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);
|
||||
|
||||
@@ -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
|
||||
*
|
||||
@@ -429,7 +429,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);
|
||||
|
||||
@@ -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@mindrot.org>
|
||||
*
|
||||
@@ -412,7 +412,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;
|
||||
|
||||
@@ -524,7 +524,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);
|
||||
@@ -535,7 +535,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);
|
||||
@@ -546,7 +546,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);
|
||||
@@ -557,7 +557,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);
|
||||
|
||||
@@ -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@mindrot.org>
|
||||
*
|
||||
@@ -83,16 +83,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);
|
||||
|
||||
Reference in New Issue
Block a user