From 70d7ebfd645256e990b585978cd3fd1fe4c59fdf Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 3 Oct 2024 11:08:31 -0400 Subject: [PATCH] MT#55283 fix signed/unsigned mixup Bit fields have been changed to unsigned. Adjust code accordingly. Warned-by: Coverity Change-Id: I5e37361f7381a5e6fa7dff557ff3558bf62c2506 --- daemon/dtls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/dtls.c b/daemon/dtls.c index c231487c3..26436070d 100644 --- a/daemon/dtls.c +++ b/daemon/dtls.c @@ -558,7 +558,7 @@ static int try_connect(struct dtls_connection *d) { int ret, code; unsigned char buf[0x10000]; - __DBG("try_connect(%i)", d->active); + __DBG("try_connect(%u)", d->active); if (d->connected) ret = SSL_read(d->ssl, buf, sizeof(buf)); /* retransmission after connected - handshake lost */ @@ -734,7 +734,7 @@ int dtls_connection_init(struct dtls_connection *d, struct packet_stream *ps, in #endif #endif - d->active = active ? -1 : 0; + d->active = active ? 1 : 0; random_string(d->tls_id, sizeof(d->tls_id));