From 20eceef4c7a1310321cf85e7a96ef167ab477862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Fri, 20 Dec 2019 11:00:53 +0100 Subject: Fix "left shift cannot be represented in type 'int'" in hello_ext.[ch] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim Rühsen --- lib/hello_ext.c | 2 +- lib/hello_ext.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hello_ext.c b/lib/hello_ext.c index 33eaa27b10..0c6c0dca01 100644 --- a/lib/hello_ext.c +++ b/lib/hello_ext.c @@ -520,7 +520,7 @@ int _gnutls_hello_ext_pack(gnutls_session_t session, gnutls_buffer_st *packed) BUFFER_APPEND_NUM(packed, 0); for (i = 0; i <= GNUTLS_EXTENSION_MAX_VALUE; i++) { - if (session->internals.used_exts & (1<internals.used_exts & (1U << i)) { ext = gid_to_ext_entry(session, i); if (ext == NULL) diff --git a/lib/hello_ext.h b/lib/hello_ext.h index f2dfd7ff6a..38b28ae069 100644 --- a/lib/hello_ext.h +++ b/lib/hello_ext.h @@ -160,7 +160,7 @@ typedef struct hello_ext_entry_st { inline static unsigned _gnutls_hello_ext_is_present(gnutls_session_t session, extensions_t id) { - if ((1 << id) & session->internals.used_exts) + if (session->internals.used_exts & (1U << id)) return 1; return 0; @@ -184,7 +184,7 @@ unsigned _gnutls_hello_ext_save(gnutls_session_t session, return 0; } - session->internals.used_exts |= (1 << id); + session->internals.used_exts |= (1U << id); return 1; } -- cgit v1.2.1