summaryrefslogtreecommitdiffstats
path: root/libnetutils/dhcpclient.c
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-05-15 15:08:50 -0700
committerMark Salyzyn <salyzyn@google.com>2014-05-23 07:49:29 -0700
commitc829080ba9ef35237764cfb0d322e564a08ba842 (patch)
tree3572da9b9463876faa6828108e10de817c6ed2d6 /libnetutils/dhcpclient.c
parentf5e2dc8967d66362a1d57ce6f764e4585aad9883 (diff)
downloadcore-c829080ba9ef35237764cfb0d322e564a08ba842.tar.gz
core-c829080ba9ef35237764cfb0d322e564a08ba842.tar.bz2
core-c829080ba9ef35237764cfb0d322e564a08ba842.zip
libnetutils: Turn on -Werror
- Get rid of a pair of out of range comparison warnings. - Turn on -Werror for compilation Change-Id: Ie6754f41f9348852a02cc0ff35befb5a76ac2883
Diffstat (limited to 'libnetutils/dhcpclient.c')
-rw-r--r--libnetutils/dhcpclient.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c
index 34500e78c..b58120ec8 100644
--- a/libnetutils/dhcpclient.c
+++ b/libnetutils/dhcpclient.c
@@ -282,16 +282,18 @@ void dump_dhcp_msg(dhcp_msg *msg, int len)
ALOGD("chaddr = {%s}", buf);
for (n = 0; n < 64; n++) {
- if ((msg->sname[n] < ' ') || (msg->sname[n] > 127)) {
- if (msg->sname[n] == 0) break;
+ unsigned char x = msg->sname[n];
+ if ((x < ' ') || (x > 127)) {
+ if (x == 0) break;
msg->sname[n] = '.';
}
}
msg->sname[63] = 0;
for (n = 0; n < 128; n++) {
- if ((msg->file[n] < ' ') || (msg->file[n] > 127)) {
- if (msg->file[n] == 0) break;
+ unsigned char x = msg->file[n];
+ if ((x < ' ') || (x > 127)) {
+ if (x == 0) break;
msg->file[n] = '.';
}
}