提交 f8a7e8a2 编写于 作者: D Daniel Gustafsson

Fix assertions which have accidental side effects

Asserting that an assignment isn't zero is a valid use of Assert(),
but these instances look more like accidental assignments due to a
missing '='. getgpsegmentCount() is already internally asserting
that the count is > 0 so we would never reach here in case it was.
上级 1029ce07
......@@ -289,7 +289,7 @@ isPrimaryWriterGangAlive(void)
int size = primaryWriterGang->size;
int i = 0;
Assert(size = getgpsegmentCount());
Assert(size == getgpsegmentCount());
for (i = 0; i < size; i++)
{
......
......@@ -942,7 +942,7 @@ ProcessUtility(Node *parsetree,
{
case RELKIND_VIEW:
case RELKIND_COMPOSITE_TYPE:
Assert(relStorage = RELSTORAGE_VIRTUAL);
Assert(relStorage == RELSTORAGE_VIRTUAL);
break;
default:
Assert(relStorage == RELSTORAGE_HEAP ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册