mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
pgindent run for 9.6
This commit is contained in:
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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--;
|
||||
|
@ -212,14 +212,15 @@ pgtls_read(PGconn *conn, void *ptr, size_t len)
|
||||
unsigned long ecode;
|
||||
|
||||
rloop:
|
||||
|
||||
/*
|
||||
* Prepare to call SSL_get_error() by clearing thread's OpenSSL error
|
||||
* queue. In general, the current thread's error queue must be empty
|
||||
* before the TLS/SSL I/O operation is attempted, or SSL_get_error()
|
||||
* will not work reliably. Since the possibility exists that other
|
||||
* OpenSSL clients running in the same thread but not under our control
|
||||
* will fail to call ERR_get_error() themselves (after their own I/O
|
||||
* operations), pro-actively clear the per-thread error queue now.
|
||||
* before the TLS/SSL I/O operation is attempted, or SSL_get_error() will
|
||||
* not work reliably. Since the possibility exists that other OpenSSL
|
||||
* clients running in the same thread but not under our control will fail
|
||||
* to call ERR_get_error() themselves (after their own I/O operations),
|
||||
* pro-actively clear the per-thread error queue now.
|
||||
*/
|
||||
SOCK_ERRNO_SET(0);
|
||||
ERR_clear_error();
|
||||
@ -228,11 +229,11 @@ rloop:
|
||||
|
||||
/*
|
||||
* Other clients of OpenSSL may fail to call ERR_get_error(), but we
|
||||
* always do, so as to not cause problems for OpenSSL clients that
|
||||
* don't call ERR_clear_error() defensively. Be sure that this
|
||||
* happens by calling now. SSL_get_error() relies on the OpenSSL
|
||||
* per-thread error queue being intact, so this is the earliest
|
||||
* possible point ERR_get_error() may be called.
|
||||
* always do, so as to not cause problems for OpenSSL clients that don't
|
||||
* call ERR_clear_error() defensively. Be sure that this happens by
|
||||
* calling now. SSL_get_error() relies on the OpenSSL per-thread error
|
||||
* queue being intact, so this is the earliest possible point
|
||||
* ERR_get_error() may be called.
|
||||
*/
|
||||
ecode = (err != SSL_ERROR_NONE || n < 0) ? ERR_get_error() : 0;
|
||||
switch (err)
|
||||
|
Reference in New Issue
Block a user