summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/an/if_an.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c
index fd34900..ffd285a 100644
--- a/sys/dev/an/if_an.c
+++ b/sys/dev/an/if_an.c
@@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$");
#endif
#include <sys/param.h>
+#include <sys/ctype.h>
#include <sys/systm.h>
#include <sys/sockio.h>
#include <sys/mbuf.h>
@@ -1593,9 +1594,7 @@ an_dump_record(struct an_softc *sc, struct an_ltv_gen *ltv, char *string)
printf("%02x ", *ptr2);
temp = *ptr2++;
- if (temp >= ' ' && temp <= '~')
- buf[count] = temp;
- else if (temp >= 'A' && temp <= 'Z')
+ if (isprint(temp))
buf[count] = temp;
else
buf[count] = '.';
OpenPOWER on IntegriCloud