Skip to content

Commit e6d8009

Browse files
committed
Correct ancient logic mistake in assertion
Found by gcc -Wlogical-op
1 parent ba3de10 commit e6d8009

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/bootstrap/bootstrap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ InsertOneValue(char *value, int i)
817817
Oid typoutput;
818818
char *prt;
819819

820-
AssertArg(i >= 0 || i < MAXATTR);
820+
AssertArg(i >= 0 && i < MAXATTR);
821821

822822
elog(DEBUG4, "inserting column %d value \"%s\"", i, value);
823823

@@ -842,7 +842,7 @@ void
842842
InsertOneNull(int i)
843843
{
844844
elog(DEBUG4, "inserting column %d NULL", i);
845-
Assert(i >= 0 || i < MAXATTR);
845+
Assert(i >= 0 && i < MAXATTR);
846846
values[i] = PointerGetDatum(NULL);
847847
Nulls[i] = true;
848848
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy