aio_kqueue_test: Fix CID 1558429

Fix a Coverity error in the aio_kqueue_test that could theoretically
(but probably not realistically) cause overindexing an array.

Differential Revision: https://reviews.freebsd.org/D48328
Reviewed by: asomers, vangyzen
Sponsored by: Dell Technologies
This commit is contained in:
David Bright
2025-01-05 11:24:13 -06:00
parent 19a6bc9f51
commit 7c94d515db
+2
View File
@@ -35,6 +35,7 @@
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include <assert.h>
#include <aio.h>
#include <err.h>
#include <errno.h>
@@ -192,6 +193,7 @@ main (int argc, char *argv[])
for (j = 0; j < max_queue_per_proc && iocb[j] != kq_iocb;
j++) ;
assert(j < max_queue_per_proc);
#ifdef DEBUG
printf("kq_iocb %p\n", kq_iocb);