summaryrefslogtreecommitdiff
path: root/gr-uhd/grc/gen_uhd_usrp_blocks.py
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2020-05-18 22:02:30 +0100
committerMartin Braun <martin@gnuradio.org>2020-05-21 10:46:58 -0700
commitde5c0123e81329e1a8f6611edeac14062114af0c (patch)
tree80d7e6891675ac0d398e3e0453645023882af00b /gr-uhd/grc/gen_uhd_usrp_blocks.py
parent4aa2ff61959a0005f50d9f591a76e69c2d3cbc34 (diff)
gr-blocks/peak_detector: Remove UB on infinities
This code fixes two issues: 1. The code used `::min()` in one place, and "minus infinity" in another, for the same purpose. 2. It used minus infinity on integer types, which is undefined behavior. (1) seems to have been accidentally left out of 9d9ea63c45b5f314eb344a69340ef49e8edafdfa. (2) Section 4.9: > The behavior is undefined if the truncated value cannot be > represented in the destination type. And trunc() on infinity is still infinity, which can't be represented in integer types.
Diffstat (limited to 'gr-uhd/grc/gen_uhd_usrp_blocks.py')
0 files changed, 0 insertions, 0 deletions