1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-22 14:32:25 +03:00

Ensure that all uses of <ctype.h> functions are applied to unsigned-char

values, whether the local char type is signed or not.  This is necessary
for portability.  Per discussion on pghackers around 9/16/00.
This commit is contained in:
Tom Lane
2000-12-03 20:45:40 +00:00
parent 4d2a506526
commit a27b691e29
59 changed files with 318 additions and 303 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.71 2000/12/03 10:27:28 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.72 2000/12/03 20:45:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -693,13 +693,13 @@ write_syslog(int level, const char *line)
l = strlen(buf);
#endif
/* already word boundary? */
if (isspace(line[l]) || line[l] == '\0')
if (isspace((unsigned char) line[l]) || line[l] == '\0')
buflen = l;
else
{
/* try to divide at word boundary */
i = l - 1;
while (i > 0 && !isspace(buf[i]))
while (i > 0 && !isspace((unsigned char) buf[i]))
i--;
if (i <= 0) /* couldn't divide word boundary */