diff options
-rw-r--r-- | drivers/isdn/capi/capidrv.c | 7 | ||||
-rw-r--r-- | drivers/isdn/hisax/q931.c | 13 |
2 files changed, 4 insertions, 16 deletions
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index bf55ed5f38e3..2978bdaa6b88 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c | |||
@@ -1450,12 +1450,9 @@ static void handle_dtrace_data(capidrv_contr *card, | |||
1450 | } | 1450 | } |
1451 | 1451 | ||
1452 | for (p = data, end = data+len; p < end; p++) { | 1452 | for (p = data, end = data+len; p < end; p++) { |
1453 | u8 w; | ||
1454 | PUTBYTE_TO_STATUS(card, ' '); | 1453 | PUTBYTE_TO_STATUS(card, ' '); |
1455 | w = (*p >> 4) & 0xf; | 1454 | PUTBYTE_TO_STATUS(card, hex_asc_hi(*p)); |
1456 | PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w); | 1455 | PUTBYTE_TO_STATUS(card, hex_asc_lo(*p)); |
1457 | w = *p & 0xf; | ||
1458 | PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w); | ||
1459 | } | 1456 | } |
1460 | PUTBYTE_TO_STATUS(card, '\n'); | 1457 | PUTBYTE_TO_STATUS(card, '\n'); |
1461 | 1458 | ||
diff --git a/drivers/isdn/hisax/q931.c b/drivers/isdn/hisax/q931.c index 8b853d58e820..c0771f98fa11 100644 --- a/drivers/isdn/hisax/q931.c +++ b/drivers/isdn/hisax/q931.c | |||
@@ -1152,20 +1152,11 @@ QuickHex(char *txt, u_char * p, int cnt) | |||
1152 | { | 1152 | { |
1153 | register int i; | 1153 | register int i; |
1154 | register char *t = txt; | 1154 | register char *t = txt; |
1155 | register u_char w; | ||
1156 | 1155 | ||
1157 | for (i = 0; i < cnt; i++) { | 1156 | for (i = 0; i < cnt; i++) { |
1158 | *t++ = ' '; | 1157 | *t++ = ' '; |
1159 | w = (p[i] >> 4) & 0x0f; | 1158 | *t++ = hex_asc_hi(p[i]); |
1160 | if (w < 10) | 1159 | *t++ = hex_asc_lo(p[i]); |
1161 | *t++ = '0' + w; | ||
1162 | else | ||
1163 | *t++ = 'A' - 10 + w; | ||
1164 | w = p[i] & 0x0f; | ||
1165 | if (w < 10) | ||
1166 | *t++ = '0' + w; | ||
1167 | else | ||
1168 | *t++ = 'A' - 10 + w; | ||
1169 | } | 1160 | } |
1170 | *t++ = 0; | 1161 | *t++ = 0; |
1171 | return (t - txt); | 1162 | return (t - txt); |