diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2011-03-01 16:55:34 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2011-03-01 16:55:34 -0800 |
commit | 0acc2454cacb3ccab512b41b96cbaa024ebb0117 (patch) | |
tree | 9c84c96681fd13c2ffd96eb92da09884058c3fa0 /src/cparse | |
parent | cf5c5f6a492bb92b25aeb880e46e9df2560a4c2e (diff) | |
download | vyatta-cfg-0acc2454cacb3ccab512b41b96cbaa024ebb0117.tar.gz vyatta-cfg-0acc2454cacb3ccab512b41b96cbaa024ebb0117.zip |
tweak map iterator usage
Diffstat (limited to 'src/cparse')
-rw-r--r-- | src/cparse/cparse.ypp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cparse/cparse.ypp b/src/cparse/cparse.ypp index 6ce60d0..24abbad 100644 --- a/src/cparse/cparse.ypp +++ b/src/cparse/cparse.ypp @@ -53,8 +53,9 @@ add_node() { pcomps.push_back(nname); CfgNode *onode = NULL; - if (node_map.find(pcomps) != node_map.end()) { - onode = node_map[pcomps]; + map<vector<string>, CfgNode *>::iterator it = node_map.find(pcomps); + if (it != node_map.end()) { + onode = it->second; } pcomps.pop_back(); if (onode) { |