From 1dab218a69831b396faec553bf967d75abcc7ebc Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 25 Aug 2010 00:53:37 +0000 Subject: [PATCH] Avoid passing signed chars to functions ... same old portability mistake as always. Per buildfarm member pika. --- src/bin/psql/command.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index a482010157..6ab65d8b5f 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2010, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.228 2010/08/14 14:20:35 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.229 2010/08/25 00:53:37 tgl Exp $ */ #include "postgres_fe.h" #include "command.h" @@ -2452,20 +2452,21 @@ strip_lineno_from_funcdesc(char *func) */ /* skip trailing whitespace */ - while (c > func && isascii(*c) && isspace(*c)) + while (c > func && isascii((unsigned char) *c) && isspace((unsigned char) *c)) c--; /* must have a digit as last non-space char */ - if (c == func || !isascii(*c) || !isdigit(*c)) + if (c == func || !isascii((unsigned char) *c) || !isdigit((unsigned char) *c)) return -1; /* find start of digit string */ - while (c > func && isascii(*c) && isdigit(*c)) + while (c > func && isascii((unsigned char) *c) && isdigit((unsigned char) *c)) c--; /* digits must be separated from func name by space or closing paren */ /* notice also that we are not allowing an empty func name ... */ - if (c == func || !isascii(*c) || !(isspace(*c) || *c == ')')) + if (c == func || !isascii((unsigned char) *c) || + !(isspace((unsigned char) *c) || *c == ')')) return -1; /* parse digit string */ -- 2.11.0