projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3d3782
)
optgroup: add check for optgroup bit numbers being within range
author
Jens Axboe
<axboe@kernel.dk>
Mon, 19 Mar 2018 21:56:20 +0000
(15:56 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 19 Mar 2018 21:56:20 +0000
(15:56 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
optgroup.c
patch
|
blob
|
blame
|
history
diff --git
a/optgroup.c
b/optgroup.c
index 122d24e98bbb80710df3ab3a7a32e7596be71984..1c418f5aa36f06064118f515e487de570b8c0cf8 100644
(file)
--- a/
optgroup.c
+++ b/
optgroup.c
@@
-1,6
+1,7
@@
#include <stdio.h>
#include <inttypes.h>
#include "optgroup.h"
+#include "compiler/compiler.h"
/*
* Option grouping
@@
-203,3
+204,5
@@
const struct opt_group *opt_group_cat_from_mask(uint64_t *mask)
{
return group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
}
+
+compiletime_assert(__FIO_OPT_G_NR <= 8 * sizeof(uint64_t), "__FIO_OPT_G_NR");