summaryrefslogtreecommitdiff
path: root/zen/guid.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-10-11 15:17:59 +0000
committerB. Stack <bgstack15@gmail.com>2022-10-11 15:17:59 +0000
commit38c826621a39831d1bdc78aa9e45cc592db3e77f (patch)
treea49cfd729d9793681a57fa6f7409b0f0848e9ede /zen/guid.h
parentMerge branch 'b11.25' into 'master' (diff)
parentadd upstream 11.26 (diff)
downloadFreeFileSync-38c826621a39831d1bdc78aa9e45cc592db3e77f.tar.gz
FreeFileSync-38c826621a39831d1bdc78aa9e45cc592db3e77f.tar.bz2
FreeFileSync-38c826621a39831d1bdc78aa9e45cc592db3e77f.zip
Merge branch 'b11.26' into 'master'11.26
add upstream 11.26 See merge request opensource-tracking/FreeFileSync!49
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