aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/preproc/extern.h3
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y8
2 files changed, 3 insertions, 8 deletions
diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h
index 06cc74f2040..357967dadd4 100644
--- a/src/interfaces/ecpg/preproc/extern.h
+++ b/src/interfaces/ecpg/preproc/extern.h
@@ -30,8 +30,7 @@ extern char *yytext,
#ifdef YYDEBUG
extern int yydebug;
#endif
-extern int yylineno,
- yyleng;
+extern int yylineno;
extern FILE *yyin,
*yyout;
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
index 42caa32a51b..88da7530219 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.311.2.8 2008/10/10 12:19:32 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.311.2.9 2009/09/08 04:25:54 tgl Exp $ */
/* Copyright comment */
%{
@@ -162,11 +162,7 @@ make3_str(char *str1, char *str2, char *str3)
static char *
make_name(void)
{
- char * name = (char *)mm_alloc(yyleng + 1);
-
- strncpy(name, yytext, yyleng);
- name[yyleng] = '\0';
- return(name);
+ return mm_strdup(yytext);
}
static char *