Loading cmds/statsd/src/external/Perfetto.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -105,9 +105,9 @@ bool CollectPerfettoTraceAndUploadToDropbox(const PerfettoDetails& config, readPipe.reset(); // Close the read end (owned by the child process). readPipe.reset(); // Close the read end (owned by the child process). // Using fopen() because fwrite() has the right logic to chunking write() // Using fdopen() because fwrite() has the right logic to chunking write() // over a pipe (see __sfvwrite()). // over a pipe (see __sfvwrite()). FILE* writePipeStream = fdopen(writePipe.get(), "wb"); FILE* writePipeStream = android::base::Fdopen(std::move(writePipe), "wb"); if (!writePipeStream) { if (!writePipeStream) { ALOGE("fdopen() failed while calling the Perfetto client: %s", strerror(errno)); ALOGE("fdopen() failed while calling the Perfetto client: %s", strerror(errno)); return false; return false; Loading Loading
cmds/statsd/src/external/Perfetto.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -105,9 +105,9 @@ bool CollectPerfettoTraceAndUploadToDropbox(const PerfettoDetails& config, readPipe.reset(); // Close the read end (owned by the child process). readPipe.reset(); // Close the read end (owned by the child process). // Using fopen() because fwrite() has the right logic to chunking write() // Using fdopen() because fwrite() has the right logic to chunking write() // over a pipe (see __sfvwrite()). // over a pipe (see __sfvwrite()). FILE* writePipeStream = fdopen(writePipe.get(), "wb"); FILE* writePipeStream = android::base::Fdopen(std::move(writePipe), "wb"); if (!writePipeStream) { if (!writePipeStream) { ALOGE("fdopen() failed while calling the Perfetto client: %s", strerror(errno)); ALOGE("fdopen() failed while calling the Perfetto client: %s", strerror(errno)); return false; return false; Loading