aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-12 23:51:10 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-12 23:51:10 +0000
commit04b54876b65fe9c138c2fcc67fa2d028b0afae94 (patch)
tree9f8a36d3dfccbac38841f1f856d7b384f9ba037b
parent6bc12a4aca7c75fdf9e8d0dbd2744e77c172c8dc (diff)
downloadpostgresql-04b54876b65fe9c138c2fcc67fa2d028b0afae94.tar.gz
postgresql-04b54876b65fe9c138c2fcc67fa2d028b0afae94.zip
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.
-rw-r--r--src/backend/utils/adt/cash.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c
index 06dc4fec8c0..ed373323460 100644
--- a/src/backend/utils/adt/cash.c
+++ b/src/backend/utils/adt/cash.c
@@ -13,7 +13,7 @@
* this version handles 64 bit numbers and so can hold values up to
* $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"
@@ -240,8 +240,9 @@ cash_in(PG_FUNCTION_ARGS)
}
}
- /* should only be trailing digits followed by whitespace or closing paren */
- while (isdigit(*s)) s++;
+ /* should only be trailing digits followed by whitespace or right paren */
+ while (isdigit((unsigned char) *s))
+ s++;
while (isspace((unsigned char) *s) || *s == ')')
s++;