summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2014-05-23 14:43:32 -0500
committerAndroid Git Automerger2014-05-23 14:43:32 -0500
commit3c55219b73cb9a9df3591b1104a32b5972c5e303 (patch)
tree3d6224194a6fda1a6ac516d2eabf40cdda746e83 /libnetutils
parentb87a780240d5a4ad4756565d5f25d92a8737e7aa (diff)
parent04482eaba2584c3a05bff4a6647f0a2e55475a91 (diff)
downloadplatform-system-core-3c55219b73cb9a9df3591b1104a32b5972c5e303.tar.gz
platform-system-core-3c55219b73cb9a9df3591b1104a32b5972c5e303.tar.xz
platform-system-core-3c55219b73cb9a9df3591b1104a32b5972c5e303.zip
am 04482eab: am f998116b: am 08c372d1: Merge "libnetutils: Turn on -Werror"
* commit '04482eaba2584c3a05bff4a6647f0a2e55475a91': libnetutils: Turn on -Werror
Diffstat (limited to 'libnetutils')
-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 aba462184..1f61511e9 100644
--- a/libnetutils/Android.mk
+++ b/libnetutils/Android.mk
@@ -1,7 +1,7 @@
1LOCAL_PATH:= $(call my-dir) 1LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS) 2include $(CLEAR_VARS)
3 3
4LOCAL_SRC_FILES:= \ 4LOCAL_SRC_FILES := \
5 dhcpclient.c \ 5 dhcpclient.c \
6 dhcpmsg.c \ 6 dhcpmsg.c \
7 dhcp_utils.c \ 7 dhcp_utils.c \
@@ -12,6 +12,8 @@ LOCAL_SHARED_LIBRARIES := \
12 libcutils \ 12 libcutils \
13 liblog 13 liblog
14 14
15LOCAL_MODULE:= libnetutils 15LOCAL_MODULE := libnetutils
16
17LOCAL_CFLAGS := -Werror
16 18
17include $(BUILD_SHARED_LIBRARY) 19include $(BUILD_SHARED_LIBRARY)
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)
282 ALOGD("chaddr = {%s}", buf); 282 ALOGD("chaddr = {%s}", buf);
283 283
284 for (n = 0; n < 64; n++) { 284 for (n = 0; n < 64; n++) {
285 if ((msg->sname[n] < ' ') || (msg->sname[n] > 127)) { 285 unsigned char x = msg->sname[n];
286 if (msg->sname[n] == 0) break; 286 if ((x < ' ') || (x > 127)) {
287 if (x == 0) break;
287 msg->sname[n] = '.'; 288 msg->sname[n] = '.';
288 } 289 }
289 } 290 }
290 msg->sname[63] = 0; 291 msg->sname[63] = 0;
291 292
292 for (n = 0; n < 128; n++) { 293 for (n = 0; n < 128; n++) {
293 if ((msg->file[n] < ' ') || (msg->file[n] > 127)) { 294 unsigned char x = msg->file[n];
294 if (msg->file[n] == 0) break; 295 if ((x < ' ') || (x > 127)) {
296 if (x == 0) break;
295 msg->file[n] = '.'; 297 msg->file[n] = '.';
296 } 298 }
297 } 299 }