summaryrefslogtreecommitdiff
path: root/src/port
diff options
context:
space:
mode:
authorTom Lane2019-05-22 16:55:34 +0000
committerTom Lane2019-05-22 16:55:34 +0000
commitbe76af171cdb3e7465c4ef234af403f97ad79b7b (patch)
tree1fa62d2b7a6680a4237a1548f7002fa0b234b143 /src/port
parent66a4bad83aaa6613a45a00a488c04427f9969fb4 (diff)
Initial pgindent run for v12.
This is still using the 2.0 version of pg_bsd_indent. I thought it would be good to commit this separately, so as to document the differences between 2.0 and 2.1 behavior. Discussion: https://postgr.es/m/16296.1558103386@sss.pgh.pa.us
Diffstat (limited to 'src/port')
-rw-r--r--src/port/dlopen.c2
-rw-r--r--src/port/pg_bitutils.c4
-rw-r--r--src/port/strtof.c13
3 files changed, 10 insertions, 9 deletions
diff --git a/src/port/dlopen.c b/src/port/dlopen.c
index 6cca2eb3703..05ad85b5b33 100644
--- a/src/port/dlopen.c
+++ b/src/port/dlopen.c
@@ -24,7 +24,7 @@
void *
dlopen(const char *file, int mode)
{
- int flags = 0;
+ int flags = 0;
if (mode & RTLD_NOW)
flags |= BIND_IMMEDIATE;
diff --git a/src/port/pg_bitutils.c b/src/port/pg_bitutils.c
index d12765b33f2..60fb55af539 100644
--- a/src/port/pg_bitutils.c
+++ b/src/port/pg_bitutils.c
@@ -203,7 +203,7 @@ pg_popcount32_asm(uint32 word)
{
uint32 res;
- __asm__ __volatile__(" popcntl %1,%0\n" : "=q"(res) : "rm"(word) : "cc");
+__asm__ __volatile__(" popcntl %1,%0\n":"=q"(res):"rm"(word):"cc");
return (int) res;
}
@@ -216,7 +216,7 @@ pg_popcount64_asm(uint64 word)
{
uint64 res;
- __asm__ __volatile__(" popcntq %1,%0\n" : "=q"(res) : "rm"(word) : "cc");
+__asm__ __volatile__(" popcntq %1,%0\n":"=q"(res):"rm"(word):"cc");
return (int) res;
}
diff --git a/src/port/strtof.c b/src/port/strtof.c
index 9e37633bda5..904cc5ff721 100644
--- a/src/port/strtof.c
+++ b/src/port/strtof.c
@@ -41,9 +41,9 @@ strtof(const char *nptr, char **endptr)
* Value might be in-range for double but not float.
*/
if (dresult != 0 && fresult == 0)
- caller_errno = ERANGE; /* underflow */
+ caller_errno = ERANGE; /* underflow */
if (!isinf(dresult) && isinf(fresult))
- caller_errno = ERANGE; /* overflow */
+ caller_errno = ERANGE; /* overflow */
}
else
caller_errno = errno;
@@ -78,7 +78,7 @@ pg_strtof(const char *nptr, char **endptr)
float fresult;
errno = 0;
- fresult = (strtof)(nptr, endptr);
+ fresult = (strtof) (nptr, endptr);
if (errno)
{
/* On error, just return the error to the caller. */
@@ -100,7 +100,8 @@ pg_strtof(const char *nptr, char **endptr)
/*
* Try again. errno is already 0 here.
*/
- double dresult = strtod(nptr, NULL);
+ double dresult = strtod(nptr, NULL);
+
if (errno)
{
/* On error, just return the error */
@@ -113,8 +114,8 @@ pg_strtof(const char *nptr, char **endptr)
errno = caller_errno;
return fresult;
}
- else if ((dresult > 0 && dresult <= FLT_MIN && (float)dresult != 0.0) ||
- (dresult < 0 && dresult >= -FLT_MIN && (float)dresult != 0.0))
+ else if ((dresult > 0 && dresult <= FLT_MIN && (float) dresult != 0.0) ||
+ (dresult < 0 && dresult >= -FLT_MIN && (float) dresult != 0.0))
{
/* subnormal but nonzero value */
errno = caller_errno;