aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c10
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y4
2 files changed, 8 insertions, 6 deletions
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 20231c62a7d..f7bfd9dca7f 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.76 2008/02/07 11:09:12 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.77 2008/03/01 03:26:34 tgl Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
@@ -122,13 +122,15 @@ next_insert(char *text, int pos, bool questionmarks)
string = string ? false : true;
else if (!string)
{
- if (text[p] == '$' && isdigit(text[p + 1]))
+ if (text[p] == '$' && isdigit((unsigned char) text[p + 1]))
{
/* this can be either a dollar quote or a variable */
int i;
- for (i = p + 1; isdigit(text[i]); i++);
- if (!isalpha(text[i]) && isascii(text[i]) && text[i] != '_')
+ for (i = p + 1; isdigit((unsigned char) text[i]); i++)
+ /* empty loop body */ ;
+ if (!isalpha((unsigned char) text[i]) &&
+ isascii((unsigned char) text[i]) && text[i] != '_')
/* not dollar delimited quote */
return p;
}
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
index 43efc431dba..0cc168b9064 100644
--- a/src/interfaces/ecpg/preproc/preproc.y
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.361 2008/02/15 22:17:06 tgl Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.362 2008/03/01 03:26:35 tgl Exp $ */
/* Copyright comment */
%{
@@ -5847,7 +5847,7 @@ prepared_name: name {
int i;
for (i = 0; i< strlen($1); i++)
- $1[i] = tolower($1[i]);
+ $1[i] = tolower((unsigned char) $1[i]);
$$ = make3_str(make_str("\""), $1, make_str("\""));
}