projects
/
users
/
kgrittn
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba3de10
)
Correct ancient logic mistake in assertion
author
Peter Eisentraut
<
[email protected]
>
Tue, 6 Sep 2011 20:05:02 +0000
(23:05 +0300)
committer
Peter Eisentraut
<
[email protected]
>
Tue, 6 Sep 2011 20:05:02 +0000
(23:05 +0300)
Found by gcc -Wlogical-op
src/backend/bootstrap/bootstrap.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/bootstrap/bootstrap.c
b/src/backend/bootstrap/bootstrap.c
index baea46c0a89bb58187a6db9d970b0ac259aecfe4..e3dd472832eff616465be99200a8369d75ad7966 100644
(file)
--- a/
src/backend/bootstrap/bootstrap.c
+++ b/
src/backend/bootstrap/bootstrap.c
@@
-817,7
+817,7
@@
InsertOneValue(char *value, int i)
Oid typoutput;
char *prt;
- AssertArg(i >= 0
||
i < MAXATTR);
+ AssertArg(i >= 0
&&
i < MAXATTR);
elog(DEBUG4, "inserting column %d value \"%s\"", i, value);
@@
-842,7
+842,7
@@
void
InsertOneNull(int i)
{
elog(DEBUG4, "inserting column %d NULL", i);
- Assert(i >= 0
||
i < MAXATTR);
+ Assert(i >= 0
&&
i < MAXATTR);
values[i] = PointerGetDatum(NULL);
Nulls[i] = true;
}