commit | e551055e17dae5d37f5cb428d63ddcae2e9341a2 | [log] [tgz] |
---|---|---|
author | Stephen Hines <srhines@google.com> | Wed Aug 08 15:27:09 2012 -0700 |
committer | android code review <noreply-gerritcodereview@google.com> | Wed Aug 08 15:27:09 2012 -0700 |
tree | 8e0c1e6233f231230338d503d5574f0362a767ad | |
parent | 80bcb4893058be698bae1bef59c4b28edda6c744 [diff] | |
parent | 97d2aef6d231b57afb7e08ef871506e98cf1f171 [diff] |
Merge "Fix signed/unsigned comparison warning"
diff --git a/adb/adb.c b/adb/adb.c index f4ee448..229f3ef 100644 --- a/adb/adb.c +++ b/adb/adb.c
@@ -1067,7 +1067,7 @@ 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; }