mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Cast isprint()'s argument to unsigned char.
ok guenther@
This commit is contained in:
parent
3d31ecf887
commit
0d35e948a8
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: answer.c,v 1.14 2015/08/22 14:47:41 deraadt Exp $ */
|
||||
/* $OpenBSD: answer.c,v 1.15 2015/10/24 17:48:36 mmcc Exp $ */
|
||||
/* $NetBSD: answer.c,v 1.3 1997/10/10 16:32:50 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -188,7 +188,7 @@ answer_next(sp)
|
||||
*/
|
||||
sp->name[NAMELEN] = '\0';
|
||||
for (cp1 = cp2 = sp->name; *cp1 != '\0'; cp1++)
|
||||
if (isprint(*cp1) || *cp1 == ' ')
|
||||
if (isprint((unsigned char)*cp1) || *cp1 == ' ')
|
||||
*cp2++ = *cp1;
|
||||
*cp2 = '\0';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user