hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y...@apache.org
Subject incubator-hawq git commit: HAWQ-649. Remove unused variables in release build, resourcepool.c
Date Sun, 10 Apr 2016 06:48:43 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master a57cc9523 -> 434b93170


HAWQ-649. Remove unused variables in release build, resourcepool.c


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

Branch: refs/heads/master
Commit: 434b93170bbd31a55143494e864cd06f5b245e6c
Parents: a57cc95
Author: YI JIN <yjin@pivotal.io>
Authored: Sun Apr 10 16:48:33 2016 +1000
Committer: YI JIN <yjin@pivotal.io>
Committed: Sun Apr 10 16:48:33 2016 +1000

----------------------------------------------------------------------
 src/backend/resourcemanager/resourcepool.c | 27 +++++++++++--------------
 1 file changed, 12 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/434b9317/src/backend/resourcemanager/resourcepool.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcepool.c b/src/backend/resourcemanager/resourcepool.c
index e5f4cdd..3ff1871 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -240,11 +240,10 @@ void getBufferedHostName(char *hostname, char **buffhostname)
 		length = strlen(hostname);
 		newstring = (char *)rm_palloc0(PCONTEXT, length+1);
 		strcpy(newstring, hostname);
-		void *oldval = setHASHTABLENode(&(PRESPOOL->BufferedHostNames),
-						 	 	 	 	(void *)&hostnamestr,
-										(void *)newstring,
-										false /* No need to free old value. */);
-		Assert(oldval == NULL);
+		setHASHTABLENode(&(PRESPOOL->BufferedHostNames),
+						 (void *)&hostnamestr,
+						 (void *)newstring,
+						 false /* No need to free old value. */);
 		*buffhostname = newstring;
 		elog(DEBUG3, "Resource manager adds new hostname %s to hostname buffer. "
 					 "Current hostname buffer size %d",
@@ -965,20 +964,18 @@ int addHAWQSegWithSegStat(SegStat segstat, bool *capstatchanged)
 		segid = segresource->Stat->ID;
 
 		/* Add HAWQ node into resource pool indexed by machine id. */
-		void *oldval = setHASHTABLENode(&(PRESPOOL->Segments),
-						  	  	  	    TYPCONVERT(void *, segid),
-										TYPCONVERT(void *, segresource),
-										false /* Should be no old value. */);
-		Assert( oldval == NULL );
+		setHASHTABLENode(&(PRESPOOL->Segments),
+						 TYPCONVERT(void *, segid),
+						 TYPCONVERT(void *, segresource),
+						 false /* Should be no old value. */);
 
 		/* Set HAWQ node indices to help find machine id. */
 		setSimpleStringRef(&hostnamekey, hostname, hostnamelen);
 
-		oldval = setHASHTABLENode(&(PRESPOOL->SegmentHostNameIndexed),
-								  TYPCONVERT(void *, &hostnamekey),
-								  TYPCONVERT(void *, segid),
-								  false /* There should be no old value. */);
-		Assert( oldval == NULL );
+		setHASHTABLENode(&(PRESPOOL->SegmentHostNameIndexed),
+						 TYPCONVERT(void *, &hostnamekey),
+						 TYPCONVERT(void *, segid),
+						 false /* There should be no old value. */);
 
 		SelfMaintainBufferData logcontent;
 		initializeSelfMaintainBuffer(&logcontent, PCONTEXT);


Mime
View raw message