summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-05-23 14:52:57 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-23 14:52:57 +0000
commitf998116bb07375c4cfbd35aa4852ff9ca36600ad (patch)
tree46ed1592e84f3e2a82083b1b8d84a25baa34d628
parent3bc628b2d4ddc3f53989bdb17f630bdf105aa1d8 (diff)
parent08c372d18ecfc02cf7cba7ef65007118b78762bd (diff)
downloadsystem_core-f998116bb07375c4cfbd35aa4852ff9ca36600ad.zip
system_core-f998116bb07375c4cfbd35aa4852ff9ca36600ad.tar.gz
system_core-f998116bb07375c4cfbd35aa4852ff9ca36600ad.tar.bz2
am 08c372d1: Merge "libnetutils: Turn on -Werror"
* commit '08c372d18ecfc02cf7cba7ef65007118b78762bd': libnetutils: Turn on -Werror
-rw-r--r--libnetutils/Android.mk8
-rw-r--r--libnetutils/dhcpclient.c10
2 files changed, 11 insertions, 7 deletions
diff --git a/libnetutils/Android.mk b/libnetutils/Android.mk
index aba4621..1f61511 100644
--- a/libnetutils/Android.mk
+++ b/libnetutils/Android.mk
@@ -1,7 +1,7 @@
-LOCAL_PATH:= $(call my-dir)
+LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= \
+LOCAL_SRC_FILES := \
dhcpclient.c \
dhcpmsg.c \
dhcp_utils.c \
@@ -12,6 +12,8 @@ LOCAL_SHARED_LIBRARIES := \
libcutils \
liblog
-LOCAL_MODULE:= libnetutils
+LOCAL_MODULE := libnetutils
+
+LOCAL_CFLAGS := -Werror
include $(BUILD_SHARED_LIBRARY)
diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c
index 34500e7..b58120e 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] = '.';
}
}