Updated Branches: refs/heads/master e935ebaeb -> 2d2417757
TS-1805: fix uninitialized result_type in NodeStatEval() BTW, refine the output when call Fatal() in statVarSet(). Signed-off-by: Yunkai Zhang <[email protected]> Signed-off-by: Zhao Yongming <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2d241775 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2d241775 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2d241775 Branch: refs/heads/master Commit: 2d24177575dd36a8ccbd3b84e0740acbabd3016e Parents: e935eba Author: Yunkai Zhang <[email protected]> Authored: Mon Apr 8 13:23:06 2013 +0800 Committer: Zhao Yongming <[email protected]> Committed: Mon Apr 8 13:40:30 2013 +0800 ---------------------------------------------------------------------- mgmt/stats/StatType.cc | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2d241775/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();
