Repository: incubator-hawq
Updated Branches:
  refs/heads/master 2576e6872 -> c6ddf2477


HAWQ-263. Fix 'Wrong sizeof argument (SIZEOF_MISMATCH)' issue in 
MoveOutCGroupForQE found by 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/c6ddf247
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/c6ddf247
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/c6ddf247

Branch: refs/heads/master
Commit: c6ddf2477eaa91f18018dec38c17e4eb9fd21a7f
Parents: 2576e68
Author: Ruilong Huo <[email protected]>
Authored: Fri Dec 18 01:05:05 2015 -0800
Committer: Ruilong Huo <[email protected]>
Committed: Fri Dec 18 01:05:05 2015 -0800

----------------------------------------------------------------------
 src/backend/resourcemanager/communication/rmcomm_QE2RMSEG.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c6ddf247/src/backend/resourcemanager/communication/rmcomm_QE2RMSEG.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/communication/rmcomm_QE2RMSEG.c 
b/src/backend/resourcemanager/communication/rmcomm_QE2RMSEG.c
index de12ff7..c2f3172 100644
--- a/src/backend/resourcemanager/communication/rmcomm_QE2RMSEG.c
+++ b/src/backend/resourcemanager/communication/rmcomm_QE2RMSEG.c
@@ -48,7 +48,7 @@ MoveToCGroupForQE(TimestampTz masterStartTime,
 
        int                     res                     = FUNC_RETURN_OK;
 
-       char            *serverHost     = "127.0.0.1";
+       const char      *serverHost     = "127.0.0.1";
        uint16_t        serverPort      = rm_segment_port;
 
        SelfMaintainBuffer sendBuffer = 
createSelfMaintainBuffer(CurrentMemoryContext);
@@ -72,6 +72,7 @@ MoveToCGroupForQE(TimestampTz masterStartTime,
                                recvBuffer,
                                                        errorbuf,
                                                        errorbufsize);
+
        deleteSelfMaintainBuffer(sendBuffer);
        deleteSelfMaintainBuffer(recvBuffer);
        return res;
@@ -95,7 +96,7 @@ MoveOutCGroupForQE(TimestampTz masterStartTime,
 
        int                     res                     = FUNC_RETURN_OK;
 
-       char            *serverHost     = "127.0.0.1";
+       const char      *serverHost     = "127.0.0.1";
        uint16_t        serverPort      = rm_segment_port;
 
        SelfMaintainBuffer sendBuffer = 
createSelfMaintainBuffer(CurrentMemoryContext);
@@ -118,7 +119,7 @@ MoveOutCGroupForQE(TimestampTz masterStartTime,
                                RESPONSE_QE_MOVEOUTCGROUP,
                                recvBuffer,
                                                        errorbuf,
-                                                       sizeof(errorbuf));
+                                                       errorbufsize);
 
        deleteSelfMaintainBuffer(sendBuffer);
        deleteSelfMaintainBuffer(recvBuffer);
@@ -144,7 +145,7 @@ SetWeightCGroupForQE(TimestampTz masterStartTime,
 
        int                     res                     = FUNC_RETURN_OK;
 
-       char            *serverHost     = "127.0.0.1";
+       const char      *serverHost     = "127.0.0.1";
        uint16_t        serverPort      = rm_segment_port;
 
        SelfMaintainBuffer sendBuffer = 
createSelfMaintainBuffer(CurrentMemoryContext);

Reply via email to