diff options
-rw-r--r-- | drivers/net/skfp/smt.c | 13 | ||||
-rw-r--r-- | net/ipv4/netfilter/ipt_CLUSTERIP.c | 5 |
2 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c index ffbfb1b79f97..805383b33d3c 100644 --- a/drivers/net/skfp/smt.c +++ b/drivers/net/skfp/smt.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "h/smc.h" | 19 | #include "h/smc.h" |
20 | #include "h/smt_p.h" | 20 | #include "h/smt_p.h" |
21 | #include <linux/bitrev.h> | 21 | #include <linux/bitrev.h> |
22 | #include <linux/kernel.h> | ||
22 | 23 | ||
23 | #define KERNEL | 24 | #define KERNEL |
24 | #include "h/smtstate.h" | 25 | #include "h/smtstate.h" |
@@ -1730,20 +1731,18 @@ void fddi_send_antc(struct s_smc *smc, struct fddi_addr *dest) | |||
1730 | #endif | 1731 | #endif |
1731 | 1732 | ||
1732 | #ifdef DEBUG | 1733 | #ifdef DEBUG |
1733 | #define hextoasc(x) "0123456789abcdef"[x] | ||
1734 | |||
1735 | char *addr_to_string(struct fddi_addr *addr) | 1734 | char *addr_to_string(struct fddi_addr *addr) |
1736 | { | 1735 | { |
1737 | int i ; | 1736 | int i ; |
1738 | static char string[6*3] = "****" ; | 1737 | static char string[6*3] = "****" ; |
1739 | 1738 | ||
1740 | for (i = 0 ; i < 6 ; i++) { | 1739 | for (i = 0 ; i < 6 ; i++) { |
1741 | string[i*3] = hextoasc((addr->a[i]>>4)&0xf) ; | 1740 | string[i * 3] = hex_asc_hi(addr->a[i]); |
1742 | string[i*3+1] = hextoasc((addr->a[i])&0xf) ; | 1741 | string[i * 3 + 1] = hex_asc_lo(addr->a[i]); |
1743 | string[i*3+2] = ':' ; | 1742 | string[i * 3 + 2] = ':'; |
1744 | } | 1743 | } |
1745 | string[5*3+2] = 0 ; | 1744 | string[5 * 3 + 2] = 0; |
1746 | return(string) ; | 1745 | return(string); |
1747 | } | 1746 | } |
1748 | #endif | 1747 | #endif |
1749 | 1748 | ||
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 1819ad7ab910..fafe8ebb4c55 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -475,11 +475,10 @@ static void arp_print(struct arp_payload *payload) | |||
475 | #define HBUFFERLEN 30 | 475 | #define HBUFFERLEN 30 |
476 | char hbuffer[HBUFFERLEN]; | 476 | char hbuffer[HBUFFERLEN]; |
477 | int j,k; | 477 | int j,k; |
478 | const char hexbuf[]= "0123456789abcdef"; | ||
479 | 478 | ||
480 | for (k=0, j=0; k < HBUFFERLEN-3 && j < ETH_ALEN; j++) { | 479 | for (k=0, j=0; k < HBUFFERLEN-3 && j < ETH_ALEN; j++) { |
481 | hbuffer[k++]=hexbuf[(payload->src_hw[j]>>4)&15]; | 480 | hbuffer[k++] = hex_asc_hi(payload->src_hw[j]); |
482 | hbuffer[k++]=hexbuf[payload->src_hw[j]&15]; | 481 | hbuffer[k++] = hex_asc_lo(payload->src_hw[j]); |
483 | hbuffer[k++]=':'; | 482 | hbuffer[k++]=':'; |
484 | } | 483 | } |
485 | hbuffer[--k]='\0'; | 484 | hbuffer[--k]='\0'; |