From fbe5ea922d25104ed062fefc18b512f6b70baca4 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Mon, 27 Apr 2009 13:22:40 -0400 Subject: [PATCH] --- yaml --- r: 144833 b: refs/heads/master c: 0f43158caddcbb110916212ebe4e39993ae70864 h: refs/heads/master i: 144831: ddaa80ffb98c26b20edeb51bdada5cbbbb158b87 v: v3 --- [refs] | 2 +- trunk/drivers/usb/gadget/usbstring.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index ecee51c95136..7601bd0f057c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 72a772a9a3da47e1cdbe01c4aa1105aa8badfff2 +refs/heads/master: 0f43158caddcbb110916212ebe4e39993ae70864 diff --git a/trunk/drivers/usb/gadget/usbstring.c b/trunk/drivers/usb/gadget/usbstring.c index 4154be375c7a..58c4d37d312a 100644 --- a/trunk/drivers/usb/gadget/usbstring.c +++ b/trunk/drivers/usb/gadget/usbstring.c @@ -38,7 +38,7 @@ static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len) uchar = (c & 0x1f) << 6; c = (u8) *s++; - if ((c & 0xc0) != 0xc0) + if ((c & 0xc0) != 0x80) goto fail; c &= 0x3f; uchar |= c; @@ -49,13 +49,13 @@ static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len) uchar = (c & 0x0f) << 12; c = (u8) *s++; - if ((c & 0xc0) != 0xc0) + if ((c & 0xc0) != 0x80) goto fail; c &= 0x3f; uchar |= c << 6; c = (u8) *s++; - if ((c & 0xc0) != 0xc0) + if ((c & 0xc0) != 0x80) goto fail; c &= 0x3f; uchar |= c;