diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-08-12 11:35:01 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-08-12 14:09:59 +0000 |
commit | d92c96e7832ae4c7f9c32eec0d2f7f661a65b73e (patch) | |
tree | f7577121b3463ad094493fbb0cf3601fbcb0f9dc /other/bootstrap_daemon/src/command_line_arguments.c | |
parent | f0f456398da65fc36837c0ab66b983a69b6f9e3e (diff) |
Fix a few warnings from clang.
Also remove the use of a VLA in a context where there can be unbounded
memory allocations.
Diffstat (limited to 'other/bootstrap_daemon/src/command_line_arguments.c')
-rw-r--r-- | other/bootstrap_daemon/src/command_line_arguments.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/other/bootstrap_daemon/src/command_line_arguments.c b/other/bootstrap_daemon/src/command_line_arguments.c index d9747932..d76bc655 100644 --- a/other/bootstrap_daemon/src/command_line_arguments.c +++ b/other/bootstrap_daemon/src/command_line_arguments.c | |||
@@ -73,13 +73,13 @@ void handle_command_line_arguments(int argc, char *argv[], char **cfg_file_path, | |||
73 | 73 | ||
74 | opterr = 0; | 74 | opterr = 0; |
75 | 75 | ||
76 | static struct option long_options[] = { | 76 | static const struct option long_options[] = { |
77 | {"config", required_argument, 0, 'c'}, // required option | 77 | {"config", required_argument, nullptr, 'c'}, // required option |
78 | {"foreground", no_argument, 0, 'f'}, | 78 | {"foreground", no_argument, nullptr, 'f'}, |
79 | {"help", no_argument, 0, 'h'}, | 79 | {"help", no_argument, nullptr, 'h'}, |
80 | {"log-backend", required_argument, 0, 'l'}, // optional, defaults to syslog | 80 | {"log-backend", required_argument, nullptr, 'l'}, // optional, defaults to syslog |
81 | {"version", no_argument, 0, 'v'}, | 81 | {"version", no_argument, nullptr, 'v'}, |
82 | {0, 0, 0, 0 } | 82 | {nullptr, 0, nullptr, 0 } |
83 | }; | 83 | }; |
84 | 84 | ||
85 | bool cfg_file_path_set = false; | 85 | bool cfg_file_path_set = false; |