@@ -195,9 +195,7 @@ static int adb_kbd_poll(ADBDevice *d, uint8_t *obuf)
{
KBDState *s = ADB_KEYBOARD(d);
int keycode;
- int olen;
- olen = 0;
if (s->count == 0) {
return 0;
}
@@ -216,7 +214,6 @@ static int adb_kbd_poll(ADBDevice *d, uint8_t *obuf)
if (keycode == 0x7f) {
obuf[0] = 0x7f;
obuf[1] = 0x7f;
- olen = 2;
} else {
obuf[0] = keycode;
/* NOTE: the power key key-up is the two byte sequence 0xff 0xff;
@@ -224,10 +221,9 @@ static int adb_kbd_poll(ADBDevice *d, uint8_t *obuf)
* byte, but choose not to bother.
*/
obuf[1] = 0xff;
- olen = 2;
}
- return olen;
+ return 2;
}
static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,