From 56253bb08fef60f4768ebb2ca013135b0dbf5df3 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 6 Mar 2018 17:34:44 -0600 Subject: rand() -> random(), since we use srandom(). rand() requires we call srand() instead, but might as well use random(). --- src/libstore/optimise-store.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore/optimise-store.cc') diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc index 891540ae4..7840167d7 100644 --- a/src/libstore/optimise-store.cc +++ b/src/libstore/optimise-store.cc @@ -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) { -- cgit v1.2.3