summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-05-22 13:23:40 +0100
committerHugo Landau <hlandau@openssl.org>2023-05-24 10:34:55 +0100
commitabbbc06a94cafa7e212bfe7dcbf818ac33d986d3 (patch)
tree58673e55d818f0c36487a3ffb76ceb7ba0948e7a /include
parent5cccc0afdb67a77f9c6eeeba2140748782c011c9 (diff)
Remove an unused variable (clang 16 warning)
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20856)
Diffstat (limited to 'include')
-rw-r--r--include/internal/ring_buf.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/internal/ring_buf.h b/include/internal/ring_buf.h
index 175f78047f..e7da3b32a0 100644
--- a/include/internal/ring_buf.h
+++ b/include/internal/ring_buf.h
@@ -102,10 +102,10 @@ static ossl_inline size_t ring_buf_push(struct ring_buf *r,
const unsigned char *buf,
size_t buf_len)
{
- size_t pushed = 0, avail, idx, l, i;
+ size_t pushed = 0, avail, idx, l;
unsigned char *start = r->start;
- for (i = 0;; ++i) {
+ for (;;) {
avail = ring_buf_avail(r);
if (buf_len > avail)
buf_len = avail;
@@ -113,8 +113,6 @@ static ossl_inline size_t ring_buf_push(struct ring_buf *r,
if (buf_len == 0)
break;
- assert(i < 2);
-
idx = r->head_offset % r->alloc;
l = r->alloc - idx;
if (buf_len < l)