Skip to contentSkip to conversation

Btrfs-progs: move crc32c optimization init

PATCH New Ilya Dryomov 1 participant 1 message Feb 12, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs-progs: move crc32c optimization init

Don't call crc32c_optimization_init() until we know that a command is actually going to be invoked.

---
 btrfs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
btrfs.c +2 -2
index 687acec..7752bd6 100644
@@ -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));
 }
Signature · 1 line
1.7.9.1