From 4cc9c28c5d8815453a074aa38db1d7b2631be980 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 15 Nov 2017 15:36:16 -0800 Subject: [PATCH] Fixed build error in ZT1Service --- src/ZT1Service.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ZT1Service.cpp b/src/ZT1Service.cpp index 6e58ce7..ff92b16 100644 --- a/src/ZT1Service.cpp +++ b/src/ZT1Service.cpp @@ -167,10 +167,10 @@ uint64_t zts_get_node_id_from_file(const char *filepath) DEBUG_EXTRA(); std::string fname("identity.public"); std::string fpath(filepath); - if (ZeroTier::OSUtils::fileExists((fpath + ZT_PATH_SEPARATOR_S + fname).c_str(),false)) { - std::string oldid; - ZeroTier::OSUtils::readFile((fpath + ZT_PATH_SEPARATOR_S + fname).c_str(),oldid); - return Utils::hexStrToU64(oldid); + std::string oldid; + if (ZeroTier::OSUtils::fileExists((fpath + ZT_PATH_SEPARATOR_S + fname).c_str(), false)) { + ZeroTier::OSUtils::readFile((fpath + ZT_PATH_SEPARATOR_S + fname).c_str(), oldid); + return Utils::hexStrToU64(oldid.c_str()); } return 0; }