From 4ece9d359fd6668bfbc9c4260463f5b5913ae8fc Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 23 Oct 2026 22:16:25 +0200 Subject: Avoid returning the result of void functions --- ot_fullscrape.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'ot_fullscrape.c') diff --git a/ot_fullscrape.c b/ot_fullscrape.c index 39f51ec..ec7f2df 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c @@ -179,12 +179,15 @@ static void fullscrape_make(int taskid, ot_tasktype mode) { if (mutex_workqueue_pushchunked(taskid, &iovector)) { free(iovector.iov_base); - return mutex_bucket_unlock(bucket, 0); + mutex_bucket_unlock(bucket, 0); + return; } /* Allocate a fresh output buffer */ r = iovector.iov_base = malloc(OT_SCRAPE_CHUNK_SIZE); - if (!r) - return mutex_bucket_unlock(bucket, 0); + if (!r) { + mutex_bucket_unlock(bucket, 0); + return; + } /* re points to low watermark */ re = r + OT_SCRAPE_CHUNK_SIZE - OT_SCRAPE_MAXENTRYLEN; @@ -256,14 +259,16 @@ static void fullscrape_make_gzip(int taskid, ot_tasktype mode) { if (mutex_workqueue_pushchunked(taskid, &iovector)) { free(iovector.iov_base); - return mutex_bucket_unlock(bucket, 0); + mutex_bucket_unlock(bucket, 0); + return; } /* Allocate a fresh output buffer */ iovector.iov_base = malloc(OT_SCRAPE_CHUNK_SIZE); if (!iovector.iov_base) { fprintf(stderr, "Out of memory trying to claim ouput buffer\n"); deflateEnd(&strm); - return mutex_bucket_unlock(bucket, 0); + mutex_bucket_unlock(bucket, 0); + return; } strm.next_out = (uint8_t *)iovector.iov_base; strm.avail_out = OT_SCRAPE_CHUNK_SIZE; -- cgit v1.3