summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkotwicz <pkotwicz@chromium.org>2015-12-04 08:25:04 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-04 16:26:13 +0000
commite3037f73de7a15a9df6f6a45a3fc1922d25ddd00 (patch)
treef43d3926f0232bf8835b8b3dd8885c14d4259e5f
parentd7c5a3215244c5aa2165b6284bc8d19d5792af8c (diff)
downloadchromium_src-e3037f73de7a15a9df6f6a45a3fc1922d25ddd00.zip
chromium_src-e3037f73de7a15a9df6f6a45a3fc1922d25ddd00.tar.gz
chromium_src-e3037f73de7a15a9df6f6a45a3fc1922d25ddd00.tar.bz2
Fix tools/android/heap_profiler:heap_dump GN compile
BUG=507294 Review URL: https://codereview.chromium.org/1500883002 Cr-Commit-Position: refs/heads/master@{#363221}
-rw-r--r--tools/android/heap_profiler/heap_dump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/android/heap_profiler/heap_dump.c b/tools/android/heap_profiler/heap_dump.c
index 5d468da..9df78c5 100644
--- a/tools/android/heap_profiler/heap_dump.c
+++ b/tools/android/heap_profiler/heap_dump.c
@@ -40,6 +40,7 @@
#include <unistd.h>
#include <sys/ptrace.h>
#include <sys/stat.h>
+#include <sys/wait.h>
#include "tools/android/heap_profiler/heap_profiler.h"
@@ -234,8 +235,6 @@ static void lseek_abs(int fd, size_t off) {
static ssize_t read_safe(int fd, void* buf, size_t count) {
ssize_t res;
size_t bytes_read = 0;
- if (count < 0)
- return -1;
do {
do {
res = read(fd, buf + bytes_read, count - bytes_read);