summaryrefslogtreecommitdiffstats
path: root/adb/usb_linux_client.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
commita7090b94c181f3efe5b53d2c8367b78d99074dfe (patch)
tree6702f5455bac81bc5c42022fc4c472faf0f70a3c /adb/usb_linux_client.cpp
parent8d2abbea76f13b76ef814ff426d88f70526f6923 (diff)
downloadsystem_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/usb_linux_client.cpp')
-rw-r--r--adb/usb_linux_client.cpp6
1 files changed, 3 insertions, 3 deletions
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)