diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 933e3ff2ee8d..e3f5d073caa6 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -996,10 +997,12 @@ static void xdump( u_char* cp, int length, char* prefix ) } pBuf += sprintf( pBuf, " " ); for(col = 0;count + col < length && col < 16; col++){ - if (isprint((int)cp[count + col])) - pBuf += sprintf( pBuf, "%c", cp[count + col] ); - else - pBuf += sprintf( pBuf, "." ); + u_char c = cp[count + col]; + + if (isascii(c) && isprint(c)) + pBuf += sprintf(pBuf, "%c", c); + else + pBuf += sprintf(pBuf, "."); } printk("%s\n", prntBuf); count += col; diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h index 2beacf2fc1ec..2f5f8875cbd1 100644 --- a/drivers/atm/iphase.h +++ b/drivers/atm/iphase.h @@ -124,7 +124,6 @@ #define IF_RXPKT(A) #endif /* CONFIG_ATM_IA_DEBUG */ -#define isprint(a) ((a >=' ')&&(a <= '~')) #define ATM_DESC(skb) (skb->protocol) #define IA_SKB_STATE(skb) (skb->protocol) #define IA_DLED 1