diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2012-02-09 18:27:45 +0100 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2012-02-09 18:27:45 +0100 |
commit | d5a5a83ad4fb8aba3b334039f567267a0463ee5a (patch) | |
tree | a6ce83d3c595fa987afed1c4dbbe18e82cc18322 /src/libstore/build.cc | |
parent | ec2827f5fc4fc8081daacb197d40d22a5e429df4 (diff) |
Use data() instead of c_str() where appropriate
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index d8f8826e1..e60ea2106 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. */ } |