summaryrefslogtreecommitdiff
path: root/services.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-17 17:03:59 -0700
committerElliott Hughes <enh@google.com>2015-04-17 17:58:35 -0700
commit0be65860ae068f043b0f1e92178be65045d3bbb5 (patch)
tree25f6d93b2a819d8b91d749b072ee5897440b50ae /services.cpp
parente7fc7ed5f7b4278db77574c9fe027b87d7c2189d (diff)
downloadadb-0be65860ae068f043b0f1e92178be65045d3bbb5.tar.gz
Remove yet more fixed-length buffers (and their overruns).
Bug: 20317724 Change-Id: If137fc96f5f23576ccecd388ac87afefa47337c6
Diffstat (limited to 'services.cpp')
-rw-r--r--services.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services.cpp b/services.cpp
index 769d58e..fa0e73f 100644
--- a/services.cpp
+++ b/services.cpp
@@ -192,7 +192,7 @@ void reboot_service(int fd, void* arg)
if (reboot_service_impl(fd, static_cast<const char*>(arg))) {
// Don't return early. Give the reboot command time to take effect
// to avoid messing up scripts which do "adb reboot && adb wait-for-device"
- while (1) {
+ while (true) {
pause();
}
}
@@ -373,7 +373,7 @@ static void subproc_waiter_service(int fd, void *cookie)
pid_t pid = (pid_t) (uintptr_t) cookie;
D("entered. fd=%d of pid=%d\n", fd, pid);
- for (;;) {
+ while (true) {
int status;
pid_t p = waitpid(pid, &status, 0);
if (p == pid) {