aboutsummaryrefslogtreecommitdiff
path: root/etherent.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-08-31 19:59:51 -0700
committerGuy Harris <guy@alum.mit.edu>2019-08-31 19:59:51 -0700
commitec82e5bbd994444c2f10e861dbf3c4d8f0fc7f96 (patch)
tree2ba5a240a146500ff391a218b5aa5de5ea77399d /etherent.c
parent0333cf8ffd7e3b6f590491f33a1ad193c4de30e6 (diff)
Get rid of PCAP_ISLWSP and PCAP_ISSPACE.
Explicitly check for the characters we care about, to make it clearer what we're doing. Fix a bug introduced by an earlier change in the process.
Diffstat (limited to 'etherent.c')
-rw-r--r--etherent.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/etherent.c b/etherent.c
index e883a9c7..3504a25e 100644
--- a/etherent.c
+++ b/etherent.c
@@ -63,7 +63,7 @@ skip_space(FILE *f)
do {
c = getc(f);
- } while (PCAP_ISLWSP(c) || c == '\r');
+ } while (c == ' ' || c == '\t' || c == '\r');
return c;
}
@@ -129,7 +129,7 @@ pcap_next_etherent(FILE *fp)
}
/* Must be whitespace */
- if (!PCAP_ISSPACE(c)) {
+ if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
c = skip_line(fp);
if (c == EOF)
return (NULL);
@@ -159,7 +159,8 @@ pcap_next_etherent(FILE *fp)
c = getc(fp);
if (c == EOF)
return (NULL);
- } while (!PCAP_ISSPACE(c) && --namesize != 0);
+ } while (c != ' ' && c != '\t' && c != '\r' && c != '\n'
+ && --namesize != 0);
*bp = '\0';
/* Eat trailing junk */