diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-08-16 00:22:32 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-11-08 11:37:28 -0500 |
commit | 2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4 (patch) | |
tree | b46993cceb7cd8b848e39a45c1bb8c73dc67b221 /src/backend/storage/buffer/bufmgr.c | |
parent | 4497f2f3b30fa5cd48898033c351bfcf01ce73e2 (diff) | |
download | postgresql-2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4.tar.gz |
Change TRUE/FALSE to true/false
The lower case spellings are C and C++ standard and are used in most
parts of the PostgreSQL sources. The upper case spellings are only used
in some files/modules. So standardize on the standard spellings.
The APIs for ICU, Perl, and Windows define their own TRUE and FALSE, so
those are left as is when using those APIs.
In code comments, we use the lower-case spelling for the C concepts and
keep the upper-case spelling for the SQL concepts.
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 15795b0c5a..572f413d6e 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -975,7 +975,7 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, * * The returned buffer is pinned and is already marked as holding the * desired page. If it already did have the desired page, *foundPtr is - * set TRUE. Otherwise, *foundPtr is set FALSE and the buffer is marked + * set true. Otherwise, *foundPtr is set false and the buffer is marked * as IO_IN_PROGRESS; ReadBuffer will now need to do I/O to fill it. * * *foundPtr is actually redundant with the buffer's BM_VALID flag, but @@ -1025,7 +1025,7 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, /* Can release the mapping lock as soon as we've pinned it */ LWLockRelease(newPartitionLock); - *foundPtr = TRUE; + *foundPtr = true; if (!valid) { @@ -1042,7 +1042,7 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, * If we get here, previous attempts to read the buffer must * have failed ... but we shall bravely try again. */ - *foundPtr = FALSE; + *foundPtr = false; } } @@ -1237,7 +1237,7 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, /* Can release the mapping lock as soon as we've pinned it */ LWLockRelease(newPartitionLock); - *foundPtr = TRUE; + *foundPtr = true; if (!valid) { @@ -1254,7 +1254,7 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, * If we get here, previous attempts to read the buffer * must have failed ... but we shall bravely try again. */ - *foundPtr = FALSE; + *foundPtr = false; } } @@ -1324,9 +1324,9 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, * read it before we did, so there's nothing left for BufferAlloc() to do. */ if (StartBufferIO(buf, true)) - *foundPtr = FALSE; + *foundPtr = false; else - *foundPtr = TRUE; + *foundPtr = true; return buf; } @@ -1564,7 +1564,7 @@ ReleaseAndReadBuffer(Buffer buffer, * * Note that ResourceOwnerEnlargeBuffers must have been done already. * - * Returns TRUE if buffer is BM_VALID, else FALSE. This provision allows + * Returns true if buffer is BM_VALID, else false. This provision allows * some callers to avoid an extra spinlock cycle. */ static bool @@ -1688,7 +1688,7 @@ PinBuffer_Locked(BufferDesc *buf) * This should be applied only to shared buffers, never local ones. * * Most but not all callers want CurrentResourceOwner to be adjusted. - * Those that don't should pass fixOwner = FALSE. + * Those that don't should pass fixOwner = false. */ static void UnpinBuffer(BufferDesc *buf, bool fixOwner) @@ -3712,7 +3712,7 @@ HoldingBufferPinThatDelaysRecovery(void) * ConditionalLockBufferForCleanup - as above, but don't wait to get the lock * * We won't loop, but just check once to see if the pin count is OK. If - * not, return FALSE with no lock held. + * not, return false with no lock held. */ bool ConditionalLockBufferForCleanup(Buffer buffer) @@ -3868,8 +3868,8 @@ WaitIO(BufferDesc *buf) * and output operations only on buffers that are BM_VALID and BM_DIRTY, * so we can always tell if the work is already done. * - * Returns TRUE if we successfully marked the buffer as I/O busy, - * FALSE if someone else already did the work. + * Returns true if we successfully marked the buffer as I/O busy, + * false if someone else already did the work. */ static bool StartBufferIO(BufferDesc *buf, bool forInput) @@ -3929,7 +3929,7 @@ StartBufferIO(BufferDesc *buf, bool forInput) * We hold the buffer's io_in_progress lock * The buffer is Pinned * - * If clear_dirty is TRUE and BM_JUST_DIRTIED is not set, we clear the + * If clear_dirty is true and BM_JUST_DIRTIED is not set, we clear the * buffer's BM_DIRTY flag. This is appropriate when terminating a * successful write. The check on BM_JUST_DIRTIED is necessary to avoid * marking the buffer clean if it was re-dirtied while we were writing. |