From a7090b94c181f3efe5b53d2c8367b78d99074dfe Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 17 Apr 2015 17:03:59 -0700 Subject: Remove yet more fixed-length buffers (and their overruns). Bug: 20317724 Change-Id: If137fc96f5f23576ccecd388ac87afefa47337c6 --- adb/usb_linux_client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'adb/usb_linux_client.cpp') 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 @@ static void *usb_adb_open_thread(void *x) 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 @@ static void *usb_ffs_open_thread(void *x) { 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) -- cgit v1.1