am f998116b: am 08c372d1: Merge "libnetutils: Turn on -Werror"

* commit 'f998116bb07375c4cfbd35aa4852ff9ca36600ad':
  libnetutils: Turn on -Werror
This commit is contained in:
Mark Salyzyn 2014-05-23 14:56:22 +00:00 committed by Android Git Automerger
commit 04482eaba2
2 changed files with 11 additions and 7 deletions

View file

@ -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)

View file

@ -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] = '.';
}
}