summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-05-23 14:56:22 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-23 14:56:22 +0000
commit04482eaba2584c3a05bff4a6647f0a2e55475a91 (patch)
tree5b742cc643648d41ff5120aed997418fccc226cf
parent800e8304a5fbc40f7d0156941345635fe4e32555 (diff)
parentf998116bb07375c4cfbd35aa4852ff9ca36600ad (diff)
downloadsystem_core-04482eaba2584c3a05bff4a6647f0a2e55475a91.zip
system_core-04482eaba2584c3a05bff4a6647f0a2e55475a91.tar.gz
system_core-04482eaba2584c3a05bff4a6647f0a2e55475a91.tar.bz2
am f998116b: am 08c372d1: Merge "libnetutils: Turn on -Werror"
* commit 'f998116bb07375c4cfbd35aa4852ff9ca36600ad': 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] = '.';
}
}