diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-03-20 13:01:28 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-03-20 13:01:28 -0700 |
commit | 272b68fec5624355f09206ef5f497c84fe69c265 (patch) | |
tree | 5c7977a387e7346f99f25d74b5dac16c3f327b0f /etherent.c | |
parent | fb7711f29bde3e906db5e07bb24c351253e99559 (diff) |
Squelch warnings.
Cast bytes read from getc(), and already known not to be EOF, to u_char
before treating them as unsigned 8-bit bytes.
Diffstat (limited to 'etherent.c')
-rw-r--r-- | etherent.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -106,13 +106,13 @@ pcap_next_etherent(FILE *fp) /* must be the start of an address */ for (i = 0; i < 6; i += 1) { - d = xdtoi(c); + d = xdtoi((u_char)c); c = getc(fp); if (c == EOF) return (NULL); if (isxdigit(c)) { d <<= 4; - d |= xdtoi(c); + d |= xdtoi((u_char)c); c = getc(fp); if (c == EOF) return (NULL); @@ -152,7 +152,7 @@ pcap_next_etherent(FILE *fp) /* Use 'namesize' to prevent buffer overflow. */ namesize = sizeof(e.name) - 1; do { - *bp++ = c; + *bp++ = (u_char)c; c = getc(fp); if (c == EOF) return (NULL); |