Skip to content

Commit

Permalink
remove unnecessary panic edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkelmann committed Mar 5, 2024
1 parent 3ab984e commit 52dc6ba
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/cwe_checker_lib/src/abstract_domain/interval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,7 @@ impl RegisterDomain for IntervalDomain {
IntervalDomain::new(
Bitvector::zero(width.into()),
Bitvector::from_u64(self.bytesize().as_bit_length() as u64)
.into_truncate(width)
.unwrap(),
.into_zero_resize(width),
)
}
}
Expand All @@ -693,16 +692,14 @@ impl RegisterDomain for IntervalDomain {
IntervalDomain::new(
Bitvector::zero(width.into()),
Bitvector::from_u64(self.bytesize().as_bit_length() as u64)
.into_truncate(width)
.unwrap(),
.into_zero_resize(width),
)
}
} else {
IntervalDomain::new(
Bitvector::zero(width.into()),
Bitvector::from_u64(self.bytesize().as_bit_length() as u64)
.into_truncate(width)
.unwrap(),
.into_zero_resize(width),
)
}
}
Expand Down

0 comments on commit 52dc6ba

Please sign in to comment.