summary refs log tree commit diff
path: root/nix/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12 14:35:44 +0100
committerLudovic Courtès <ludo@gnu.org>2015-06-03 18:05:33 +0200
commit5c84e4950d8504e386fc1f454fb4653993a8fbea (patch)
tree5aa94c4ac70f97e07f7d8c467dd6fa2a8893bc1c /nix/libstore/gc.cc
parentccade8c120c53d56863aeda27bcd2f1f484779cb (diff)
downloadguix-5c84e4950d8504e386fc1f454fb4653993a8fbea.tar.gz
Ensure we're writing to stderr in the builder
http://hydra.nixos.org/build/17862041
Diffstat (limited to 'nix/libstore/gc.cc')
-rw-r--r--nix/libstore/gc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc
index f98e02c1e2..885a459449 100644
--- a/nix/libstore/gc.cc
+++ b/nix/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;
         }