You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/04/15 22:46:53 UTC

[46/50] git commit: TS-1805: fix uninitialized result_type in NodeStatEval()

TS-1805: fix uninitialized result_type in NodeStatEval()

BTW, refine the output when call Fatal() in statVarSet().

Signed-off-by: Yunkai Zhang <qi...@taobao.com>
Signed-off-by: Zhao Yongming <mi...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/93049169
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/93049169
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/93049169

Branch: refs/heads/3.3.x
Commit: 930491697f135ff4954653c408e01fc56375864c
Parents: a4ad3e8
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Mon Apr 8 13:23:06 2013 +0800
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Apr 15 14:45:44 2013 -0600

----------------------------------------------------------------------
 mgmt/stats/StatType.cc |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/93049169/mgmt/stats/StatType.cc
----------------------------------------------------------------------
diff --git a/mgmt/stats/StatType.cc b/mgmt/stats/StatType.cc
index efdde92..868a2f4 100644
--- a/mgmt/stats/StatType.cc
+++ b/mgmt/stats/StatType.cc
@@ -252,7 +252,7 @@ bool StatExprToken::statVarSet(RecDataT type, RecData value)
       else if (type == RECD_FLOAT || type == RECD_CONST)
         converted_value.rec_int = (RecInt)value.rec_float;
       else
-        Fatal("invalid value type:%d\n", m_token_type);
+        Fatal("%s, invalid value type:%d\n", m_token_name, type);
       break;
     case RECD_FLOAT:
       if (type == RECD_NULL)
@@ -262,10 +262,10 @@ bool StatExprToken::statVarSet(RecDataT type, RecData value)
       else if (type == RECD_FLOAT || type == RECD_CONST)
         converted_value.rec_float = value.rec_float;
       else
-        Fatal("invalid value type:%d\n", m_token_type);
+        Fatal("%s, invalid value type:%d\n", m_token_name, type);
       break;
     default:
-      Fatal("unsupported token type:%d\n", m_token_type);
+      Fatal("%s, unsupported token type:%d\n", m_token_name, m_token_type);
     }
   } else {
     converted_value = value;
@@ -673,6 +673,8 @@ RecData StatObject::NodeStatEval(RecDataT *result_type, bool cluster)
   RecData tempValue;
   RecDataClear(RECD_NULL, &tempValue);
 
+  *result_type = RECD_NULL;
+
   /* Express checkout lane -- Stat. object with on 1 source variable */
   if (m_postfix->count() == 1) {
     StatExprToken * src = m_postfix->top();