Message ID | 1360697957-27461-1-git-send-email-idryomov@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
diff --git a/btrfs.c b/btrfs.c index 687acec..7752bd6 100644 --- a/btrfs.c +++ b/btrfs.c @@ -261,8 +261,6 @@ int main(int argc, char **argv) { const struct cmd_struct *cmd; - crc32c_optimization_init(); - argc--; argv++; handle_options(&argc, &argv); @@ -278,6 +276,8 @@ int main(int argc, char **argv) handle_help_options_next_level(cmd, argc, argv); + crc32c_optimization_init(); + fixup_argv0(argv, cmd->token); exit(cmd->fn(argc, argv)); }
Don't call crc32c_optimization_init() until we know that a command is actually going to be invoked. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> --- btrfs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)