1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 16:02:43 +01:00

rand() -> random(), since we use srandom().

rand() requires we call srand() instead,
but might as well use random().
This commit is contained in:
Will Dietz 2018-03-06 17:34:44 -06:00
parent 70dbac7491
commit 56253bb08f
3 changed files with 3 additions and 3 deletions

View file

@ -213,7 +213,7 @@ void LocalStore::optimisePath_(Activity * act, OptimiseStats & stats,
MakeReadOnly makeReadOnly(mustToggle ? dirOf(path) : "");
Path tempLink = (format("%1%/.tmp-link-%2%-%3%")
% realStoreDir % getpid() % rand()).str();
% realStoreDir % getpid() % random()).str();
if (link(linkPath.c_str(), tempLink.c_str()) == -1) {
if (errno == EMLINK) {