aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-06-09 18:02:36 -0400
committerRobert Haas <rhaas@postgresql.org>2016-06-09 18:02:36 -0400
commit4bc424b968058c7f0aa685821d7039e86faac99c (patch)
treea4e245ae67bd11edb3926ff5fb3b0223438ac283 /src/interfaces/ecpg
parent9164deea2f4ac90ee5e008ff41fc5ad4423887b2 (diff)
downloadpostgresql-4bc424b968058c7f0aa685821d7039e86faac99c.tar.gz
postgresql-4bc424b968058c7f0aa685821d7039e86faac99c.zip
pgindent run for 9.6
Diffstat (limited to 'src/interfaces/ecpg')
-rw-r--r--src/interfaces/ecpg/compatlib/informix.c3
-rw-r--r--src/interfaces/ecpg/ecpglib/extern.h2
-rw-r--r--src/interfaces/ecpg/preproc/descriptor.c5
-rw-r--r--src/interfaces/ecpg/preproc/output.c6
4 files changed, 9 insertions, 7 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 9f7776ee919..e50aa5ec656 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -666,7 +666,7 @@ dttofmtasc(timestamp * ts, char *output, int str_len, char *fmtstr)
int
intoasc(interval * i, char *str)
{
- char *tmp;
+ char *tmp;
errno = 0;
tmp = PGTYPESinterval_to_asc(i);
@@ -1032,6 +1032,7 @@ void
ECPG_informix_reset_sqlca(void)
{
struct sqlca_t *sqlca = ECPGget_sqlca();
+
if (sqlca == NULL)
return;
diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h
index 263e0014fde..c3082beb4a3 100644
--- a/src/interfaces/ecpg/ecpglib/extern.h
+++ b/src/interfaces/ecpg/ecpglib/extern.h
@@ -44,7 +44,7 @@ struct ECPGtype_information_cache
{
struct ECPGtype_information_cache *next;
int oid;
- enum ARRAY_TYPE isarray;
+ enum ARRAY_TYPE isarray;
};
/* structure to store one statement */
diff --git a/src/interfaces/ecpg/preproc/descriptor.c b/src/interfaces/ecpg/preproc/descriptor.c
index ebd95d3c4ba..9b4eb630a9a 100644
--- a/src/interfaces/ecpg/preproc/descriptor.c
+++ b/src/interfaces/ecpg/preproc/descriptor.c
@@ -175,7 +175,7 @@ output_get_descr(char *desc_name, char *index)
for (results = assignments; results != NULL; results = results->next)
{
const struct variable *v = find_variable(results->variable);
- char *str_zero = mm_strdup("0");
+ char *str_zero = mm_strdup("0");
switch (results->value)
{
@@ -295,7 +295,8 @@ output_set_descr(char *desc_name, char *index)
case ECPGd_length:
case ECPGd_type:
{
- char *str_zero = mm_strdup("0");
+ char *str_zero = mm_strdup("0");
+
fprintf(yyout, "%s,", get_dtype(results->value));
ECPGdump_a_type(yyout, v->name, v->type, v->brace_level, NULL, NULL, -1, NULL, NULL, str_zero, NULL, NULL);
free(str_zero);
diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c
index cf2ed58d0ac..c1ba55d5170 100644
--- a/src/interfaces/ecpg/preproc/output.c
+++ b/src/interfaces/ecpg/preproc/output.c
@@ -197,9 +197,9 @@ output_escaped_str(char *str, bool quoted)
int i = 0;
int len = strlen(str);
- if (quoted && str[0] == '"' && str[len - 1] == '"') /* do not escape quotes
- * at beginning and end
- * if quoted string */
+ if (quoted && str[0] == '"' && str[len - 1] == '"') /* do not escape quotes
+ * at beginning and end
+ * if quoted string */
{
i = 1;
len--;