From f677b7e6faa460b73b87d5c93f00f4c9c39acf41 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 22 Jun 2009 15:04:42 +1200 Subject: [PATCH] Author: Henrik Nordstrom Make GCC-4.4 happy --- src/wccp2.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wccp2.cc b/src/wccp2.cc index f3118860dd..1830145338 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -1183,7 +1183,9 @@ wccp2HandleUdp(int sock, void *not_used) /* Go through the data structure */ while (data_length > offset) { - header = (struct wccp2_item_header_t *) &wccp2_i_see_you.data[offset]; + char *data = wccp2_i_see_you.data; + + header = (struct wccp2_item_header_t *) &data[offset]; switch (ntohs(header->type)) { @@ -1402,6 +1404,7 @@ wccp2HandleUdp(int sock, void *not_used) for (num_caches = 0; num_caches < (int) ntohl(tmp); num_caches++) { /* Get a copy of the ip */ + memset(&cache_address, 0, sizeof(cache_address)); // Make GCC happy switch (Config.Wccp2.assignment_method) { -- 2.47.2