aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/pathlocks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/pathlocks.cc')
-rw-r--r--src/libstore/pathlocks.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc
index cad893726..a698609d3 100644
--- a/src/libstore/pathlocks.cc
+++ b/src/libstore/pathlocks.cc
@@ -155,7 +155,7 @@ bool PathLocks::lockPaths(const PathSet & _paths,
paths.sort();
/* Acquire the lock for each path. */
- for (Paths::iterator i = paths.begin(); i != paths.end(); i++) {
+ foreach (Paths::iterator, i, paths) {
checkInterrupt();
Path path = *i;
Path lockPath = path + ".lock";
@@ -219,7 +219,7 @@ PathLocks::~PathLocks()
void PathLocks::unlock()
{
- for (list<FDPair>::iterator i = fds.begin(); i != fds.end(); i++) {
+ foreach (list<FDPair>::iterator, i, fds) {
if (deletePaths) deleteLockFilePreClose(i->second, i->first);
lockedPaths.erase(i->second);