aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adb/adb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/adb/adb.c b/adb/adb.c
index f4ee4485..229f3efd 100644
--- a/adb/adb.c
+++ b/adb/adb.c
@@ -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;
}