fix: remove redundant sizeof check

Co-authored-by: Tatsuhiro Tsujikawa <404610+tatsuhiro-t@users.noreply.github.com>
This commit is contained in:
Ville Vesilehto
2025-01-24 13:24:40 +02:00
committed by GitHub
parent d06472b2c1
commit 01accaef55

View File

@@ -603,7 +603,7 @@ static int hd_ringbuf_init(nghttp2_hd_ringbuf *ringbuf, size_t bufsize,
for (size = 1; size < bufsize; size <<= 1)
;
if (size * sizeof(nghttp2_hd_entry *) > max_size) {
if (size > max_size) {
return NGHTTP2_ERR_NOMEM;
}