Index: device/usb/usb_service_impl.cc |
diff --git a/device/usb/usb_service_impl.cc b/device/usb/usb_service_impl.cc |
index ea7ad7f498108d213619935c2de2ddbb107b6fa1..2261ad6930bdd1b246daf7e3abc957a9994131a9 100644 |
--- a/device/usb/usb_service_impl.cc |
+++ b/device/usb/usb_service_impl.cc |
@@ -127,10 +127,9 @@ bool IsWinUsbInterface(const std::string& device_path) { |
} |
USB_LOG(DEBUG) << "Driver for " << device_path << " is " << buffer << "."; |
- if (base::strncasecmp("WinUSB", (const char*)&buffer[0], sizeof "WinUSB") == |
- 0) { |
+ if (base::StartsWith(reinterpret_cast<const char*>(buffer), "WinUSB", |
+ base::CompareCase::INSENSITIVE_ASCII)) |
return true; |
- } |
return false; |
} |