From 82ea1cf35a2b10bb7a2cfbaa0d9bac98fe5bb182 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 13 Oct 2018 08:08:41 -0400 Subject: [PATCH] key_manager: Remove unnecessary seek in DeriveSDSeed() Given the file is opened a few lines above and no operations are done, other than check if the file is in a valid state, the read/write pointer will always be at the beginning of the file. --- src/core/crypto/key_manager.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index a59a7e1f57..4ade67d236 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp @@ -152,7 +152,6 @@ boost::optional DeriveSDSeed() { if (!sd_private.IsOpen()) return boost::none; - sd_private.Seek(0, SEEK_SET); std::array private_seed{}; if (sd_private.ReadBytes(private_seed.data(), private_seed.size()) != 0x10) return boost::none;