From 787cc3a4e59726e68765dbeb6a3f282c7b00f463 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 14 Sep 2017 19:11:10 +0200 Subject: [PATCH] dhcp: Don't use signed char for DHCP options The value of DHCP_OPTEND is 255. When it is assigned this result in a sign change as the positive int constant is cast to a signed char and -1 results. Clang 4.0 complains about this. --- src/libcharon/plugins/dhcp/dhcp_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcharon/plugins/dhcp/dhcp_socket.c b/src/libcharon/plugins/dhcp/dhcp_socket.c index 42f8f1ef9..4f4e1ffe0 100644 --- a/src/libcharon/plugins/dhcp/dhcp_socket.c +++ b/src/libcharon/plugins/dhcp/dhcp_socket.c @@ -176,7 +176,7 @@ typedef struct __attribute__((packed)) { char server_hostname[64]; char boot_filename[128]; uint32_t magic_cookie; - char options[252]; + u_char options[252]; } dhcp_t; /**