diff options
-rw-r--r-- | lib/hello_ext.c | 2 | ||||
-rw-r--r-- | 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<<i)) { + if (session->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; } |