Btrfs-progs: move crc32c optimization init

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>
This commit is contained in:
Ilya Dryomov 2013-02-12 21:24:50 +02:00 committed by David Sterba
parent 5956f752c6
commit 2f4e4e448f

View File

@ -263,8 +263,6 @@ int main(int argc, char **argv)
{
const struct cmd_struct *cmd;
crc32c_optimization_init();
argc--;
argv++;
handle_options(&argc, &argv);
@ -280,6 +278,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));
}