aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header10
-rw-r--r--src/interfaces/ecpg/preproc/extern.h5
2 files changed, 5 insertions, 10 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
index c2091d28293..709482641f6 100644
--- a/src/interfaces/ecpg/preproc/ecpg.header
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.7 2009/06/10 23:11:52 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.7.2.1 2009/09/08 04:25:14 tgl Exp $ */
/* Copyright comment */
%{
@@ -184,11 +184,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 *
@@ -220,7 +216,7 @@ create_questionmarks(char *name, bool array)
for (; count > 0; count --)
{
sprintf(pacounter_buffer, "$%d", pacounter++);
- result = cat_str(3, result, strdup(pacounter_buffer), make_str(" , "));
+ result = cat_str(3, result, mm_strdup(pacounter_buffer), make_str(" , "));
}
/* removed the trailing " ," */
diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h
index a7a125c13b2..badf56fbf74 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.73 2009/06/11 14:49:13 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.73.2.1 2009/09/08 04:25:14 tgl Exp $ */
#ifndef _ECPG_PREPROC_EXTERN_H
#define _ECPG_PREPROC_EXTERN_H
@@ -39,8 +39,7 @@ extern char *yytext,
#ifdef YYDEBUG
extern int yydebug;
#endif
-extern int yylineno,
- yyleng;
+extern int yylineno;
extern FILE *yyin,
*yyout;
extern char *output_filename;