diff options
author | Elliott Hughes <enh@google.com> | 2015-04-17 17:03:59 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-04-17 17:58:35 -0700 |
commit | a7090b94c181f3efe5b53d2c8367b78d99074dfe (patch) | |
tree | 6702f5455bac81bc5c42022fc4c472faf0f70a3c /adb/services.cpp | |
parent | 8d2abbea76f13b76ef814ff426d88f70526f6923 (diff) | |
download | system_core-a7090b94c181f3efe5b53d2c8367b78d99074dfe.zip system_core-a7090b94c181f3efe5b53d2c8367b78d99074dfe.tar.gz system_core-a7090b94c181f3efe5b53d2c8367b78d99074dfe.tar.bz2 |
Remove yet more fixed-length buffers (and their overruns).
Bug: 20317724
Change-Id: If137fc96f5f23576ccecd388ac87afefa47337c6
Diffstat (limited to 'adb/services.cpp')
-rw-r--r-- | adb/services.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adb/services.cpp b/adb/services.cpp index 769d58e..fa0e73f 100644 --- a/adb/services.cpp +++ b/adb/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) { |