Skip to content
Snippets Groups Projects
Commit c64499b6 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

minor scope reduction.


Signed-off-by: default avatarkristof <Kristof.Szabados@ericsson.com>
parent b8ea0656
No related branches found
No related tags found
No related merge requests found
......@@ -165,10 +165,10 @@ void RAW_enc_tree::put_to_buf(TTCN_Buffer &buf){
void RAW_enc_tree::calc_fields()
{
if (isleaf) {
int szumm = 0;
RAW_enc_tree *atm;
switch (calc) {
case CALC_LENGTH: {
int szumm = 0;
RAW_enc_tree *atm;
if (calcof.lengthto.unit != -1) {
for (int a = 0; a < calcof.lengthto.num_of_fields; a++) {
atm = get_node(calcof.lengthto.fields[a]);
......@@ -195,7 +195,8 @@ void RAW_enc_tree::calc_fields()
b = get_node(curr_pos);
}
curr_pos.pos[curr_pos.level - 1] = cl;
atm = get_node(calcof.pointerto.target);
int szumm = 0;
RAW_enc_tree *atm = get_node(calcof.pointerto.target);
if (atm) szumm = (atm->startpos - b->startpos + calcof.pointerto.unit - 1
- calcof.pointerto.ptr_offset) / calcof.pointerto.unit;
INTEGER temp(szumm);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment