Skip to content
Snippets Groups Projects
Commit 04b54876 authored by Tom Lane's avatar Tom Lane
Browse files

Fix a portability bug (ye olde not casting a <ctype.h> argument to

unsigned char).  Fortunately we still have buildfarm machines that
will flag this.  Seems to be new in CVS HEAD, so no backpatch.
parent 6bc12a4a
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* this version handles 64 bit numbers and so can hold values up to * this version handles 64 bit numbers and so can hold values up to
* $92,233,720,368,547,758.07. * $92,233,720,368,547,758.07.
* *
* $PostgreSQL: pgsql/src/backend/utils/adt/cash.c,v 1.70 2007/02/27 23:48:07 tgl Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/cash.c,v 1.71 2007/07/12 23:51:10 tgl Exp $
*/ */
#include "postgres.h" #include "postgres.h"
...@@ -240,8 +240,9 @@ cash_in(PG_FUNCTION_ARGS) ...@@ -240,8 +240,9 @@ cash_in(PG_FUNCTION_ARGS)
} }
} }
/* should only be trailing digits followed by whitespace or closing paren */ /* should only be trailing digits followed by whitespace or right paren */
while (isdigit(*s)) s++; while (isdigit((unsigned char) *s))
s++;
while (isspace((unsigned char) *s) || *s == ')') while (isspace((unsigned char) *s) || *s == ')')
s++; s++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment