Correct ancient logic mistake in assertion
Found by gcc -Wlogical-op
This commit is contained in:
parent
ba3de10c4e
commit
e6d800981e
@ -817,7 +817,7 @@ InsertOneValue(char *value, int i)
|
|||||||
Oid typoutput;
|
Oid typoutput;
|
||||||
char *prt;
|
char *prt;
|
||||||
|
|
||||||
AssertArg(i >= 0 || i < MAXATTR);
|
AssertArg(i >= 0 && i < MAXATTR);
|
||||||
|
|
||||||
elog(DEBUG4, "inserting column %d value \"%s\"", i, value);
|
elog(DEBUG4, "inserting column %d value \"%s\"", i, value);
|
||||||
|
|
||||||
@ -842,7 +842,7 @@ void
|
|||||||
InsertOneNull(int i)
|
InsertOneNull(int i)
|
||||||
{
|
{
|
||||||
elog(DEBUG4, "inserting column %d NULL", i);
|
elog(DEBUG4, "inserting column %d NULL", i);
|
||||||
Assert(i >= 0 || i < MAXATTR);
|
Assert(i >= 0 && i < MAXATTR);
|
||||||
values[i] = PointerGetDatum(NULL);
|
values[i] = PointerGetDatum(NULL);
|
||||||
Nulls[i] = true;
|
Nulls[i] = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user