summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc
diff options
context:
space:
mode:
authorPeter Eisentraut2017-08-16 04:22:32 +0000
committerPeter Eisentraut2017-11-08 16:37:28 +0000
commit2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4 (patch)
treeb46993cceb7cd8b848e39a45c1bb8c73dc67b221 /src/backend/storage/ipc
parent4497f2f3b30fa5cd48898033c351bfcf01ce73e2 (diff)
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 <[email protected]>
Diffstat (limited to 'src/backend/storage/ipc')
-rw-r--r--src/backend/storage/ipc/procarray.c6
-rw-r--r--src/backend/storage/ipc/shmem.c8
-rw-r--r--src/backend/storage/ipc/shmqueue.c8
-rw-r--r--src/backend/storage/ipc/sinvaladt.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index ffa6180effd..37e12bd8295 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1791,7 +1791,7 @@ GetSnapshotData(Snapshot snapshot)
* check that the source transaction is still running, and we'd better do
* that atomically with installing the new xmin.
*
- * Returns TRUE if successful, FALSE if source xact is no longer running.
+ * Returns true if successful, false if source xact is no longer running.
*/
bool
ProcArrayInstallImportedXmin(TransactionId xmin,
@@ -1866,7 +1866,7 @@ ProcArrayInstallImportedXmin(TransactionId xmin,
* PGPROC of the transaction from which we imported the snapshot, rather than
* an XID.
*
- * Returns TRUE if successful, FALSE if source xact is no longer running.
+ * Returns true if successful, false if source xact is no longer running.
*/
bool
ProcArrayInstallRestoredXmin(TransactionId xmin, PGPROC *proc)
@@ -2873,7 +2873,7 @@ CountUserBackends(Oid roleid)
* The current backend is always ignored; it is caller's responsibility to
* check whether the current backend uses the given DB, if it's important.
*
- * Returns TRUE if there are (still) other backends in the DB, FALSE if not.
+ * Returns true if there are (still) other backends in the DB, false if not.
* Also, *nbackends and *nprepared are set to the number of other backends
* and prepared transactions in the DB, respectively.
*
diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c
index 81c291f6e37..22522676f3c 100644
--- a/src/backend/storage/ipc/shmem.c
+++ b/src/backend/storage/ipc/shmem.c
@@ -257,7 +257,7 @@ ShmemAllocUnlocked(Size size)
/*
* ShmemAddrIsValid -- test if an address refers to shared memory
*
- * Returns TRUE if the pointer points within the shared memory segment.
+ * Returns true if the pointer points within the shared memory segment.
*/
bool
ShmemAddrIsValid(const void *addr)
@@ -361,7 +361,7 @@ ShmemInitHash(const char *name, /* table string name for shmem index */
* for it. If it exists already, a pointer to the existing
* structure is returned.
*
- * Returns: pointer to the object. *foundPtr is set TRUE if the object was
+ * Returns: pointer to the object. *foundPtr is set true if the object was
* already in the shmem index (hence, already initialized).
*
* Note: before Postgres 9.0, this function returned NULL for some failure
@@ -388,7 +388,7 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr)
/* Must be initializing a (non-standalone) backend */
Assert(shmemseghdr->index != NULL);
structPtr = shmemseghdr->index;
- *foundPtr = TRUE;
+ *foundPtr = true;
}
else
{
@@ -403,7 +403,7 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr)
Assert(shmemseghdr->index == NULL);
structPtr = ShmemAlloc(size);
shmemseghdr->index = structPtr;
- *foundPtr = FALSE;
+ *foundPtr = false;
}
LWLockRelease(ShmemIndexLock);
return structPtr;
diff --git a/src/backend/storage/ipc/shmqueue.c b/src/backend/storage/ipc/shmqueue.c
index 1026e67b947..da67495b034 100644
--- a/src/backend/storage/ipc/shmqueue.c
+++ b/src/backend/storage/ipc/shmqueue.c
@@ -40,7 +40,7 @@ SHMQueueInit(SHM_QUEUE *queue)
}
/*
- * SHMQueueIsDetached -- TRUE if element is not currently
+ * SHMQueueIsDetached -- true if element is not currently
* in a queue.
*/
bool
@@ -174,7 +174,7 @@ SHMQueuePrev(const SHM_QUEUE *queue, const SHM_QUEUE *curElem, Size linkOffset)
}
/*
- * SHMQueueEmpty -- TRUE if queue head is only element, FALSE otherwise
+ * SHMQueueEmpty -- true if queue head is only element, false otherwise
*/
bool
SHMQueueEmpty(const SHM_QUEUE *queue)
@@ -184,7 +184,7 @@ SHMQueueEmpty(const SHM_QUEUE *queue)
if (queue->prev == queue)
{
Assert(queue->next == queue);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c
index 1b9d32b7cff..0d517a00e63 100644
--- a/src/backend/storage/ipc/sinvaladt.c
+++ b/src/backend/storage/ipc/sinvaladt.c
@@ -627,7 +627,7 @@ SIGetDataEntries(SharedInvalidationMessage *data, int datasize)
* SICleanupQueue
* Remove messages that have been consumed by all active backends
*
- * callerHasWriteLock is TRUE if caller is holding SInvalWriteLock.
+ * callerHasWriteLock is true if caller is holding SInvalWriteLock.
* minFree is the minimum number of message slots to make free.
*
* Possible side effects of this routine include marking one or more