summaryrefslogtreecommitdiff
path: root/zen/guid.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-10-11 11:16:39 -0400
committerB. Stack <bgstack15@gmail.com>2022-10-11 11:16:39 -0400
commitcab22f2dc3c5f41b5163f74cbb233e390edff6ff (patch)
treea49cfd729d9793681a57fa6f7409b0f0848e9ede /zen/guid.h
parentMerge branch 'b11.25' into 'master' (diff)
downloadFreeFileSync-cab22f2dc3c5f41b5163f74cbb233e390edff6ff.tar.gz
FreeFileSync-cab22f2dc3c5f41b5163f74cbb233e390edff6ff.tar.bz2
FreeFileSync-cab22f2dc3c5f41b5163f74cbb233e390edff6ff.zip
add upstream 11.26
Diffstat (limited to 'zen/guid.h')
-rw-r--r--zen/guid.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/guid.h b/zen/guid.h
index 8d0553ec..d67d2d0b 100644
--- a/zen/guid.h
+++ b/zen/guid.h
@@ -25,7 +25,7 @@ std::string generateGUID() //creates a 16-byte GUID
#endif
#if __GLIBC_PREREQ(2, 25) //getentropy() requires Glibc 2.25 (ldd --version) PS: CentOS 7 is on 2.17
- if (::getentropy(&guid[0], guid.size()) != 0) //"The maximum permitted value for the length argument is 256"
+ if (::getentropy(guid.data(), guid.size()) != 0) //"The maximum permitted value for the length argument is 256"
throw std::runtime_error(std::string(__FILE__) + '[' + numberTo<std::string>(__LINE__) + "] Failed to generate GUID." + "\n\n" +
utfTo<std::string>(formatSystemError("getentropy", errno)));
#else
@@ -58,7 +58,7 @@ std::string generateGUID() //creates a 16-byte GUID
const int fd_ = ::open("/dev/urandom", O_RDONLY | O_CLOEXEC);
};
thread_local RandomGeneratorPosix gen;
- gen.getBytes(&guid[0], guid.size());
+ gen.getBytes(guid.data(), guid.size());
#endif
return guid;
bgstack15