summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2020-10-16 17:57:21 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2020-10-16 17:57:21 +0000
commit8c9969fde56e4bd08e1efd3bd8cc25d7624f04c3 (patch)
treec5f46342423e9204829ec7b872a3514e0802f944
parent67b0bfbc6ef41b0d409748dda3cbc41072da5a1a (diff)
Add an explicit cast to make this test compile and pass with gcc.
gcc emits a signed vs unsigned comparison warning which breaks the build due to -Werror.
-rw-r--r--regress/lib/libssl/dtls/dtlstest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/lib/libssl/dtls/dtlstest.c b/regress/lib/libssl/dtls/dtlstest.c
index c25800be195..ae8075f709f 100644
--- a/regress/lib/libssl/dtls/dtlstest.c
+++ b/regress/lib/libssl/dtls/dtlstest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dtlstest.c,v 1.3 2020/10/15 18:05:06 jsing Exp $ */
+/* $OpenBSD: dtlstest.c,v 1.4 2020/10/16 17:57:20 tb Exp $ */
/*
* Copyright (c) 2020 Joel Sing <jsing@openbsd.org>
*
@@ -100,7 +100,7 @@ bio_packet_monkey_ctrl(BIO *bio, int cmd, long num, void *ptr)
return 1;
case BIO_C_DROP_RANDOM:
- if (num < 0 || num > UINT_MAX)
+ if (num < 0 || (size_t)num > UINT_MAX)
return 0;
ctx->drop_rand = (unsigned int)num;
return 1;