}
/* Helper: check @opt_num is listed in @opts array */
-static int _is_option_listed(int opt_enum, int *options)
+static int _is_option_listed(int opt_enum, const int *options)
{
int i;
/* Check @opt_enum is an option allowing group commit/reload */
static int _option_allows_group_commit(int opt_enum)
{
- int options[] = {
+ static const int _options[] = {
permission_ARG,
alloc_ARG,
contiguous_ARG,
-1
};
- return _is_option_listed(opt_enum, options);
+ return _is_option_listed(opt_enum, _options);
}
/* Check @opt_enum requires direct commit/reload */
static int _option_requires_direct_commit(int opt_enum)
{
- int options[] = {
+ static const int _options[] = {
discards_ARG,
zero_ARG,
cachemode_ARG,
-1
};
- return _is_option_listed(opt_enum, options);
+ return _is_option_listed(opt_enum, _options);
}
/*