Skip to content

Commit efaf478

Browse files
committed
cmdline: constify length of an array size
1 parent 8c50f45 commit efaf478

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmdline.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ std::unique_ptr<nsjconf_t> parseArgs(int argc, char *argv[]) {
546546
nsjconf->openfds.push_back(STDERR_FILENO);
547547

548548
/* Generate options array for getopt_long. */
549-
size_t options_length = ARR_SZ(custom_opts) + 1;
549+
const size_t options_length = ARR_SZ(custom_opts) + 1;
550550
struct option opts[options_length];
551551
for (unsigned i = 0; i < ARR_SZ(custom_opts); i++) {
552552
opts[i] = custom_opts[i].opt;

0 commit comments

Comments
 (0)