hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iw...@apache.org
Subject incubator-hawq git commit: HAWQ-508. Fix pointer check issue in coverity
Date Mon, 14 Mar 2016 01:47:13 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 2eb936a42 -> 604856c09


HAWQ-508. Fix pointer check issue in coverity


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/604856c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/604856c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/604856c0

Branch: refs/heads/master
Commit: 604856c0952dd0c90882afe58744a9ddb7219d9c
Parents: 2eb936a
Author: ivan <iweng@pivotal.io>
Authored: Mon Mar 14 09:41:00 2016 +0800
Committer: ivan <iweng@pivotal.io>
Committed: Mon Mar 14 09:41:00 2016 +0800

----------------------------------------------------------------------
 src/backend/commands/tablecmds.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/604856c0/src/backend/commands/tablecmds.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index e7a53b9..c47b828 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -13824,17 +13824,14 @@ ATPExecPartAdd(AlteredTableInfo *tab,
 										   errOmitLocation(true)));
 
 			/* XXX XXX: move this check to gram.y ? */
-			if (pElem)
-			{
-				if (pElem->boundSpec)
-					ereport(ERROR,
-							(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
-							 errmsg("invalid use of boundary specification "
-									"for DEFAULT partition%s of %s",
-									namBuf,
-									lrelname),
-											   errOmitLocation(true)));
-			}
+            if (pElem->boundSpec)
+                ereport(ERROR,
+                        (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+                         errmsg("invalid use of boundary specification "
+                                "for DEFAULT partition%s of %s",
+                                namBuf,
+                                lrelname),
+                                           errOmitLocation(true)));
 		}
 
 		/* Do the real work for add ... */


Mime
View raw message