Merge "libnetutils: Turn on -Werror"

This commit is contained in:
Mark Salyzyn 2014-05-23 14:51:07 +00:00 committed by Gerrit Code Review
commit 08c372d18e
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] = '.';
}
}