From 510c9ce916464d6958c4394169fb5e885f4d3a06 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Mon, 23 Jan 2006 18:50:54 +0000 Subject: remove unsigned char * warning with gcc 4.0 --- useful_functions.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'useful_functions.c') diff --git a/useful_functions.c b/useful_functions.c index 0cd3d51..131851a 100644 --- a/useful_functions.c +++ b/useful_functions.c @@ -44,18 +44,18 @@ const unsigned char msk_type_bridge_group[ETH_ALEN] = {255,255,255,255,255,255}; * then always has the same length */ int ebt_printstyle_mac; -void ebt_print_mac(const char *mac) +void ebt_print_mac(const unsigned char *mac) { if (ebt_printstyle_mac == 2) { int j; for (j = 0; j < ETH_ALEN; j++) - printf("%02x%s", (unsigned char)mac[j], + printf("%02x%s", mac[j], (j==ETH_ALEN-1) ? "" : ":"); } else printf("%s", ether_ntoa((struct ether_addr *) mac)); } -void ebt_print_mac_and_mask(const char *mac, const char *mask) +void ebt_print_mac_and_mask(const unsigned char *mac, const unsigned char *mask) { char hlpmsk[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; @@ -91,7 +91,8 @@ struct ethertypeent *parseethertypebynumber(int type) } /* Put the mac address into 6 (ETH_ALEN) bytes returns 0 on success. */ -int ebt_get_mac_and_mask(char *from, char *to, char *mask) +int ebt_get_mac_and_mask(const char *from, unsigned char *to, + unsigned char *mask) { char *p; int i; -- cgit v1.2.3