1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

Run pgindent with new pg_bsd_indent version 2.1.1.

Thomas Munro fixed a longstanding annoyance in pg_bsd_indent, that
it would misformat lines containing IsA() macros on the assumption
that the IsA() call should be treated like a cast.  This improves
some other cases involving field/variable names that match typedefs,
too.  The only places that get worse are a couple of uses of the
OpenSSL macro STACK_OF(); we'll gladly take that trade-off.

Discussion: https://postgr.es/m/20200114221814.GA19630@alvherre.pgsql
This commit is contained in:
Tom Lane
2020-05-16 11:54:51 -04:00
parent e02ad575d8
commit fa27dd40d5
33 changed files with 47 additions and 47 deletions

View File

@ -138,7 +138,7 @@ detzcode(const char *const codep)
* Do two's-complement negation even on non-two's-complement machines.
* If the result would be minval - 1, return minval.
*/
result -= !TWOS_COMPLEMENT(int32) &&result != 0;
result -= !TWOS_COMPLEMENT(int32) && result != 0;
result += minval;
}
return result;
@ -152,7 +152,7 @@ detzcode64(const char *const codep)
int64 one = 1;
int64 halfmaxval = one << (64 - 2);
int64 maxval = halfmaxval - 1 + halfmaxval;
int64 minval = -TWOS_COMPLEMENT(int64) -maxval;
int64 minval = -TWOS_COMPLEMENT(int64) - maxval;
result = codep[0] & 0x7f;
for (i = 1; i < 8; ++i)
@ -164,7 +164,7 @@ detzcode64(const char *const codep)
* Do two's-complement negation even on non-two's-complement machines.
* If the result would be minval - 1, return minval.
*/
result -= !TWOS_COMPLEMENT(int64) &&result != 0;
result -= !TWOS_COMPLEMENT(int64) && result != 0;
result += minval;
}
return result;
@ -173,7 +173,7 @@ detzcode64(const char *const codep)
static bool
differ_by_repeat(const pg_time_t t1, const pg_time_t t0)
{
if (TYPE_BIT(pg_time_t) -TYPE_SIGNED(pg_time_t) <SECSPERREPEAT_BITS)
if (TYPE_BIT(pg_time_t) - TYPE_SIGNED(pg_time_t) < SECSPERREPEAT_BITS)
return 0;
return t1 - t0 == SECSPERREPEAT;
}
@ -1480,7 +1480,7 @@ timesub(const pg_time_t *timep, int32 offset,
int leapdays;
tdelta = tdays / DAYSPERLYEAR;
if (!((!TYPE_SIGNED(pg_time_t) ||INT_MIN <= tdelta)
if (!((!TYPE_SIGNED(pg_time_t) || INT_MIN <= tdelta)
&& tdelta <= INT_MAX))
goto out_of_range;
idelta = tdelta;