aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/preproc/extern.h5
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y8
2 files changed, 4 insertions, 9 deletions
diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h
index 3581b35e3e1..46a93f8fac2 100644
--- a/src/interfaces/ecpg/preproc/extern.h
+++ b/src/interfaces/ecpg/preproc/extern.h
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.63 2006/03/11 04:38:40 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.63.2.1 2009/09/08 04:25:40 tgl Exp $ */
#ifndef _ECPG_PREPROC_EXTERN_H
#define _ECPG_PREPROC_EXTERN_H
@@ -32,8 +32,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 4161d071962..64806cd051e 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.339.2.5 2008/10/10 12:19:47 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.339.2.6 2009/09/08 04:25:41 tgl Exp $ */
/* Copyright comment */
%{
@@ -164,11 +164,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 *