Fix signed/unsigned comparison warning

Trivial warning fix.

Change-Id: I93b905b34155214fc2d211a0d9319f06b67fa193
Author: Edwin Vane <edwin.vane@intel.com>
Reviewed-by: Ariel J Bernal <ariel.j.bernal@intel.com>
This commit is contained in:
Edwin Vane 2012-07-26 13:24:35 -04:00
parent 8bcfb8bcff
commit 97d2aef6d2
1 changed files with 1 additions and 1 deletions

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;
}