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-67. Wrong variable type for saving fgetc() return value
Date Mon, 19 Oct 2015 05:49:06 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 52e970628 -> 571e7cfc9


HAWQ-67. Wrong variable type for saving fgetc() return value


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

Branch: refs/heads/master
Commit: 571e7cfc9ef75f4de4ec8405c3c8115418df65fb
Parents: 52e9706
Author: Yi Jin <yjin@pivotal.io>
Authored: Mon Oct 19 13:48:39 2015 +0800
Committer: Yi Jin <yjin@pivotal.io>
Committed: Mon Oct 19 13:48:39 2015 +0800

----------------------------------------------------------------------
 src/backend/resourcemanager/resourcepool.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/571e7cfc/src/backend/resourcemanager/resourcepool.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcepool.c b/src/backend/resourcemanager/resourcepool.c
index 004cd67..3fd4dce 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -3621,7 +3621,7 @@ void refreshSlavesFileHostSize(FILE *fp)
 	initializeSelfMaintainBuffer(&smb, PCONTEXT);
 	while( true )
 	{
-		char c = fgetc(fp);
+		int c = fgetc(fp);
 		if ( c == EOF )
 		{
 			if ( feof(fp) == 0 )
@@ -3653,7 +3653,8 @@ void refreshSlavesFileHostSize(FILE *fp)
 		else
 		{
 			/* Add this character into the buffer. */
-			appendSelfMaintainBuffer(&smb, &c, 1);
+			char cval = c;
+			appendSelfMaintainBuffer(&smb, &cval, 1);
 		}
 	}
 


Mime
View raw message