提交 4402f8f8 编写于 作者: D Daniel Gustafsson

Remove pointless NULL check

At this point we already know that pQry is non-NULL as we have
dereferenced it previous in the function. Remove useless check
to make the code clearer.

Per gripe by Coverity.
上级 ddd726f5
......@@ -270,8 +270,7 @@ GetDumpSegmentDatabaseArray(PGconn *pConn,
pSegDBAr->count = x;
cleanup:
if (pQry != NULL)
destroyPQExpBuffer(pQry);
destroyPQExpBuffer(pQry);
if (pRes != NULL)
PQclear(pRes);
......@@ -465,8 +464,7 @@ GetRestoreSegmentDatabaseArray(PGconn *pConn,
restorePairAr->count = x;
cleanup:
if (pQry != NULL)
destroyPQExpBuffer(pQry);
destroyPQExpBuffer(pQry);
if (pRes != NULL)
PQclear(pRes);
......
......@@ -155,8 +155,7 @@ GetCDBBaseTableArray(PGconn *pConn, CDBBaseTableArray *pTableAr)
cleanup:
if (pRes != NULL)
PQclear(pRes);
if (pQry != NULL)
destroyPQExpBuffer(pQry);
destroyPQExpBuffer(pQry);
return bRtn;
}
......@@ -249,8 +248,7 @@ GetCDBSegmentInstanceArray(PGconn *pConn, const char *pszDBName, CDBSegmentInsta
cleanup:
if (pRes != NULL)
PQclear(pRes);
if (pQry != NULL)
destroyPQExpBuffer(pQry);
destroyPQExpBuffer(pQry);
return bRtn;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册