Remove yet more fixed-length buffers (and their overruns).
Bug: 20317724
Change-Id: If137fc96f5f23576ccecd388ac87afefa47337c6
diff --git a/adb/usb_linux_client.cpp b/adb/usb_linux_client.cpp
index 8d670f8..343f20c 100644
--- a/adb/usb_linux_client.cpp
+++ b/adb/usb_linux_client.cpp
@@ -163,7 +163,7 @@
struct usb_handle *usb = (struct usb_handle *)x;
int fd;
- while (1) {
+ while (true) {
// wait until the USB device needs opening
adb_mutex_lock(&usb->lock);
while (usb->fd != -1)
@@ -347,14 +347,14 @@
{
struct usb_handle *usb = (struct usb_handle *)x;
- while (1) {
+ while (true) {
// wait until the USB device needs opening
adb_mutex_lock(&usb->lock);
while (usb->control != -1 && usb->bulk_in != -1 && usb->bulk_out != -1)
adb_cond_wait(&usb->notify, &usb->lock);
adb_mutex_unlock(&usb->lock);
- while (1) {
+ while (true) {
init_functionfs(usb);
if (usb->control >= 0 && usb->bulk_in >= 0 && usb->bulk_out >= 0)