summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorSimon Nagl <simonnagl@aim.com>2016-05-23 21:06:25 +0200
committerSimon Nagl <simonnagl@aim.com>2016-05-23 21:06:25 +0200
commit31193268a6ab2ac9436adbe10832c09d7c6ffa54 (patch)
treeee0b24ea7d20be26d8a39a2f07006ced3a6d4d4c /src/main.c
parent7f1116661d341f084e580a180f0fdffc28083bca (diff)
Bugfix: Fix clang compiler build fails.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/main.c b/src/main.c
index 2e10356ebd..569a15b27f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -244,6 +244,19 @@ void help(int exitcode) {
exit(exitcode);
}
+// TODO: Remove this function with the nix major release.
+void remove_option(int opt_index, int *argc, char **argv) {
+ int i = opt_index;
+ // remove the options.
+ do {
+ *argc = *argc - 1;
+ for(i = opt_index; i < *argc; i++) {
+ argv[i] = argv[i+1];
+ }
+ i = opt_index;
+ } while(argv[i][0] != '-' && opt_index >= *argc);
+}
+
int main(int argc, char **argv)
{
@@ -264,18 +277,6 @@ int main(int argc, char **argv)
// parse depercated options
// TODO: Remove this block with the next major release.
{
- void remove_option(int opt_index, int *argc, char **argv) {
- int i = opt_index;
- // remove the options.
- do {
- *argc = *argc - 1;
- for(i = opt_index; i < *argc; i++) {
- argv[i] = argv[i+1];
- }
- i = opt_index;
- } while(argv[i][0] != '-' && opt_index >= *argc);
- }
-
i = 1;
while(i < argc) {
if(strcmp(argv[i], "-pidfile") == 0 && (i+1) < argc) {