]> granicus.if.org Git - postgresql/commitdiff
Correct statement to actually be the intended assert statement.
authorAndres Freund <andres@anarazel.de>
Mon, 14 Dec 2015 10:25:04 +0000 (11:25 +0100)
committerAndres Freund <andres@anarazel.de>
Mon, 14 Dec 2015 10:25:04 +0000 (11:25 +0100)
e3f4cfc7 introduced a LWLockHeldByMe() call, without the corresponding
Assert() surrounding it.

Spotted by Coverity.

Backpatch: 9.1+, like the previous commit

src/backend/storage/buffer/bufmgr.c

index 1d6a81d10cd70f3afecd5cd548297c62cf282b30..f1564ee4434a6092bf0761c23028bdbc3915f540 100644 (file)
@@ -2943,7 +2943,7 @@ FlushOneBuffer(Buffer buffer)
 
        bufHdr = GetBufferDescriptor(buffer - 1);
 
-       LWLockHeldByMe(bufHdr->content_lock);
+       Assert(LWLockHeldByMe(bufHdr->content_lock));
 
        FlushBuffer(bufHdr, NULL);
 }