Since the A-Z range is contained in the previous check, the else-if is
dead code. Clean up both by using isprint() instead, since that's what it really wants. Coverity ID: 100 Found by: Coverity Prevent
This commit is contained in:
parent
972e95c81a
commit
c74da55a0e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154866
@ -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] = '.';
|
||||
|
Loading…
Reference in New Issue
Block a user