aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/buffer')
-rw-r--r--src/backend/storage/buffer/bufmgr.c24
-rw-r--r--src/backend/storage/buffer/localbuf.c6
2 files changed, 15 insertions, 15 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 1ac603e68df..285617678a1 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.150 2003/12/20 22:18:02 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.151 2004/01/07 18:56:27 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -372,7 +372,7 @@ BufferAlloc(Relation reln,
* it to disk. Remember to unlock BufMgrLock while doing the IOs.
*/
inProgress = FALSE;
- for (buf = (BufferDesc *) NULL; buf == (BufferDesc *) NULL;)
+ for (buf = NULL; buf == NULL;)
{
buf = StrategyGetBuffer();
@@ -399,7 +399,7 @@ BufferAlloc(Relation reln,
if ((buf->flags & BM_IO_ERROR) != 0)
{
UnpinBuffer(buf);
- buf = (BufferDesc *) NULL;
+ buf = NULL;
continue;
}
@@ -440,7 +440,7 @@ BufferAlloc(Relation reln,
buf->flags &= ~BM_IO_IN_PROGRESS;
TerminateBufferIO(buf);
UnpinBuffer(buf);
- buf = (BufferDesc *) NULL;
+ buf = NULL;
}
else
{
@@ -476,7 +476,7 @@ BufferAlloc(Relation reln,
buf->flags &= ~BM_IO_IN_PROGRESS;
TerminateBufferIO(buf);
UnpinBuffer(buf);
- buf = (BufferDesc *) NULL;
+ buf = NULL;
}
/*
@@ -799,7 +799,7 @@ BufferSync(int percent, int maxpages)
bufHdr->flags &= ~BM_JUST_DIRTIED;
LWLockRelease(BufMgrLock);
- if (reln == (Relation) NULL)
+ if (reln == NULL)
{
status = smgrblindwrt(DEFAULT_SMGR,
bufHdr->tag.rnode,
@@ -849,7 +849,7 @@ BufferSync(int percent, int maxpages)
LWLockRelease(BufMgrLock);
/* drop refcnt obtained by RelationNodeCacheGetRelation */
- if (reln != (Relation) NULL)
+ if (reln != NULL)
RelationDecrementReferenceCount(reln);
}
@@ -1105,7 +1105,7 @@ BufferReplace(BufferDesc *bufHdr)
reln = RelationNodeCacheGetRelation(bufHdr->tag.rnode);
- if (reln != (Relation) NULL)
+ if (reln != NULL)
{
status = smgrwrite(DEFAULT_SMGR, reln,
bufHdr->tag.blockNum,
@@ -1119,7 +1119,7 @@ BufferReplace(BufferDesc *bufHdr)
}
/* drop relcache refcnt incremented by RelationNodeCacheGetRelation */
- if (reln != (Relation) NULL)
+ if (reln != NULL)
RelationDecrementReferenceCount(reln);
/* Pop the error context stack */
@@ -1949,7 +1949,7 @@ LockBufferForCleanup(Buffer buffer)
* Note : We assume that nested buffer IO never occur.
* i.e at most one io_in_progress lock is held per proc.
*/
-static BufferDesc *InProgressBuf = (BufferDesc *) NULL;
+static BufferDesc *InProgressBuf = NULL;
static bool IsForInput;
/*
@@ -1991,7 +1991,7 @@ TerminateBufferIO(BufferDesc *buf)
{
Assert(buf == InProgressBuf);
LWLockRelease(buf->io_in_progress_lock);
- InProgressBuf = (BufferDesc *) NULL;
+ InProgressBuf = NULL;
}
/*
@@ -2016,7 +2016,7 @@ ContinueBufferIO(BufferDesc *buf, bool forInput)
void
InitBufferIO(void)
{
- InProgressBuf = (BufferDesc *) NULL;
+ InProgressBuf = NULL;
}
#endif
diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c
index fe282a8c66a..01c83039280 100644
--- a/src/backend/storage/buffer/localbuf.c
+++ b/src/backend/storage/buffer/localbuf.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.50 2003/11/29 19:51:56 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.51 2004/01/07 18:56:27 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,7 +41,7 @@ BufferDesc *
LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr)
{
int i;
- BufferDesc *bufHdr = (BufferDesc *) NULL;
+ BufferDesc *bufHdr = NULL;
/* a low tech search for now -- not optimized for scans */
for (i = 0; i < NLocBuffer; i++)
@@ -93,7 +93,7 @@ LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr)
Relation bufrel = RelationNodeCacheGetRelation(bufHdr->tag.rnode);
/* flush this page */
- if (bufrel == (Relation) NULL)
+ if (bufrel == NULL)
{
smgrblindwrt(DEFAULT_SMGR,
bufHdr->tag.rnode,