about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc10
-rw-r--r--src/libstore/gc.cc2
-rw-r--r--src/libstore/references.cc2
-rw-r--r--src/libstore/remote-store.cc4
4 files changed, 9 insertions, 9 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index d8f8826e19..e60ea2106c 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1379,7 +1379,7 @@ HookReply DerivationGoal::tryBuildHook()
             break;
         }
         s += "\n";
-        writeToStderr((unsigned char *) s.c_str(), s.size());
+        writeToStderr((unsigned char *) s.data(), s.size());
     }
 
     debug(format("hook reply is `%1%'") % reply);
@@ -2036,12 +2036,12 @@ void DerivationGoal::handleChildOutput(int fd, const string & data)
         (!hook && fd == builderOut.readSide))
     {
         if (verbosity >= buildVerbosity)
-            writeToStderr((unsigned char *) data.c_str(), data.size());
-        writeFull(fdLogFile, (unsigned char *) data.c_str(), data.size());
+            writeToStderr((unsigned char *) data.data(), data.size());
+        writeFull(fdLogFile, (unsigned char *) data.data(), data.size());
     }
 
     if (hook && fd == hook->fromHook.readSide)
-        writeToStderr((unsigned char *) data.c_str(), data.size());
+        writeToStderr((unsigned char *) data.data(), data.size());
 }
 
 
@@ -2409,7 +2409,7 @@ void SubstitutionGoal::handleChildOutput(int fd, const string & data)
 {
     assert(fd == logPipe.readSide);
     if (verbosity >= buildVerbosity)
-        writeToStderr((unsigned char *) data.c_str(), data.size());
+        writeToStderr((unsigned char *) data.data(), data.size());
     /* Don't write substitution output to a log file for now.  We
        probably should, though. */
 }
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 14c8ba0bfe..c2e999a6e6 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -196,7 +196,7 @@ void LocalStore::addTempRoot(const Path & path)
     lockFile(fdTempRoots, ltWrite, true);
 
     string s = path + '\0';
-    writeFull(fdTempRoots, (const unsigned char *) s.c_str(), s.size());
+    writeFull(fdTempRoots, (const unsigned char *) s.data(), s.size());
 
     /* Downgrade to a read lock. */
     debug(format("downgrading to read lock on `%1%'") % fnTempRoots);
diff --git a/src/libstore/references.cc b/src/libstore/references.cc
index c1f9e3ba77..282b848938 100644
--- a/src/libstore/references.cc
+++ b/src/libstore/references.cc
@@ -69,7 +69,7 @@ void RefScanSink::operator () (const unsigned char * data, size_t len)
        fragment, so search in the concatenation of the tail of the
        previous fragment and the start of the current fragment. */
     string s = tail + string((const char *) data, len > refLength ? refLength : len);
-    search((const unsigned char *) s.c_str(), s.size(), hashes, seen);
+    search((const unsigned char *) s.data(), s.size(), hashes, seen);
 
     search(data, len, hashes, seen);
 
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 6e9921ede7..c77a128705 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -509,7 +509,7 @@ void RemoteStore::processStderr(Sink * sink, Source * source)
         if (msg == STDERR_WRITE) {
             string s = readString(from);
             if (!sink) throw Error("no sink");
-            (*sink)((const unsigned char *) s.c_str(), s.size());
+            (*sink)((const unsigned char *) s.data(), s.size());
         }
         else if (msg == STDERR_READ) {
             if (!source) throw Error("no source");
@@ -521,7 +521,7 @@ void RemoteStore::processStderr(Sink * sink, Source * source)
         }
         else {
             string s = readString(from);
-            writeToStderr((const unsigned char *) s.c_str(), s.size());
+            writeToStderr((const unsigned char *) s.data(), s.size());
         }
     }
     if (msg == STDERR_ERROR) {