aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/misc.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2004-06-27 12:28:42 +0000
committerMichael Meskes <meskes@postgresql.org>2004-06-27 12:28:42 +0000
commit03ad5da8f89d7bc199a711e1c49b64c2b2832154 (patch)
tree830ee40d7f91a744419b6b3f49a3b130037515fc /src/interfaces/ecpg/ecpglib/misc.c
parent4eb5f0a8e2a8ef37751ad6086714afed9da31b48 (diff)
downloadpostgresql-03ad5da8f89d7bc199a711e1c49b64c2b2832154.tar.gz
postgresql-03ad5da8f89d7bc199a711e1c49b64c2b2832154.zip
- Only use typedefs inside their scope.
- Variables that are out of scope, were not removed all the time. - Make a varchar NULL set everything to 0 when not using indicators. - Synced parser.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/misc.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/misc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index d2f81a16282..8faf6b2fdff 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.20 2004/03/14 14:47:33 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.21 2004/06/27 12:28:40 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -266,7 +266,7 @@ ECPGlog(const char *format,...)
}
void
-ECPGset_informix_null(enum ECPGttype type, void *ptr)
+ECPGset_noind_null(enum ECPGttype type, void *ptr)
{
switch (type)
{
@@ -301,6 +301,7 @@ ECPGset_informix_null(enum ECPGttype type, void *ptr)
break;
case ECPGt_varchar:
*(((struct ECPGgeneric_varchar *) ptr)->arr) = 0x00;
+ ((struct ECPGgeneric_varchar *) ptr)->len = 0;
break;
case ECPGt_decimal:
memset((char *) ptr, 0, sizeof(decimal));
@@ -331,7 +332,7 @@ _check(unsigned char *ptr, int length)
}
bool
-ECPGis_informix_null(enum ECPGttype type, void *ptr)
+ECPGis_noind_null(enum ECPGttype type, void *ptr)
{
switch (type)
{