am e551055e: Merge "Fix signed/unsigned comparison warning"

* commit 'e551055e17dae5d37f5cb428d63ddcae2e9341a2':
  Fix signed/unsigned comparison warning
This commit is contained in:
Stephen Hines 2012-08-08 16:02:42 -07:00 committed by Android Git Automerger
commit e7b2a43638

View file

@ -1067,7 +1067,7 @@ void connect_device(char* host, char* buffer, int buffer_size)
strncpy(hostbuf, host, sizeof(hostbuf) - 1);
if (portstr) {
if (portstr - host >= sizeof(hostbuf)) {
if ((unsigned int)(portstr - host) >= sizeof(hostbuf)) {
snprintf(buffer, buffer_size, "bad host name %s", host);
return;
}