Remove yet more fixed-length buffers (and their overruns).
Bug: 20317724
Change-Id: If137fc96f5f23576ccecd388ac87afefa47337c6
diff --git a/services.cpp b/services.cpp
index 769d58e..fa0e73f 100644
--- a/services.cpp
+++ b/services.cpp
@@ -192,7 +192,7 @@
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 @@
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) {