aboutsummaryrefslogtreecommitdiff
path: root/darwin-user/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'darwin-user/main.c')
-rw-r--r--darwin-user/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/darwin-user/main.c b/darwin-user/main.c
index 35196a1..72307ad 100644
--- a/darwin-user/main.c
+++ b/darwin-user/main.c
@@ -809,9 +809,6 @@ int main(int argc, char **argv)
usage();
}
}
- if (optind >= argc)
- usage();
- filename = argv[optind];
/* init debug */
cpu_set_log_filename(log_file);
@@ -830,6 +827,11 @@ int main(int argc, char **argv)
cpu_set_log(mask);
}
+ if (optind >= argc) {
+ usage();
+ }
+ filename = argv[optind];
+
/* Zero out regs */
memset(regs, 0, sizeof(struct target_pt_regs));