Skip to content

Commit abef695

Browse files
committed
Squash warning
1 parent 3cf8241 commit abef695

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

str.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ static char xnibble(char c) {
654654
}
655655

656656
void xhexdump(void (*fn)(char, void *), void *a, const void *buf, size_t len) {
657-
const uint8_t *p = (const uint8_t *) buf;
657+
const unsigned char *p = (const unsigned char *) buf;
658658
char ascii[16];
659659
size_t i, j, n = 0;
660660
for (i = 0; i < len; i++) {
@@ -670,7 +670,7 @@ void xhexdump(void (*fn)(char, void *), void *a, const void *buf, size_t len) {
670670
fn(xnibble((i >> 4) & 15), a), fn('0', a);
671671
fn(' ', a), fn(' ', a), fn(' ', a);
672672
}
673-
fn(xnibble(p[i] >> 4), a), fn(xnibble(p[i] & 15), a);
673+
fn(xnibble((p[i] >> 4) & 15), a), fn(xnibble(p[i] & 15), a);
674674
fn(' ', a); // Space after hex number
675675
if (p[i] >= ' ' && p[i] <= '~') {
676676
ascii[n++] = (char) p[i]; // Printable

0 commit comments

Comments
 (0)