about summary refs log tree commit diff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T13·35+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T13·35+0100
commit28f22b4653bfcf1be41b042c8068b6513dd3e931 (patch)
tree9eadec69bd2e6b35c204976e752bccd48bb07df8 /src/libstore/gc.cc
parent5a2d45164899479cb3dfe94cb7659fd522163acc (diff)
Ensure we're writing to stderr in the builder
http://hydra.nixos.org/build/17862041
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 49cb11d23290..7959a592d987 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -191,7 +191,7 @@ void LocalStore::addTempRoot(const Path & path)
     lockFile(fdTempRoots, ltWrite, true);
 
     string s = path + '\0';
-    writeFull(fdTempRoots, (const unsigned char *) s.data(), s.size());
+    writeFull(fdTempRoots, s);
 
     /* Downgrade to a read lock. */
     debug(format("downgrading to read lock on ‘%1%’") % fnTempRoots);
@@ -231,7 +231,7 @@ static void readTempRoots(PathSet & tempRoots, FDs & fds)
         if (lockFile(*fd, ltWrite, false)) {
             printMsg(lvlError, format("removing stale temporary roots file ‘%1%’") % path);
             unlink(path.c_str());
-            writeFull(*fd, (const unsigned char *) "d", 1);
+            writeFull(*fd, "d");
             continue;
         }