]> sigrok.org Git - libsigrok.git/commitdiff
std: remove open coded array items count, make floats stand out
authorGerhard Sittig <redacted>
Sat, 22 Jan 2022 12:47:17 +0000 (13:47 +0100)
committerGerhard Sittig <redacted>
Sun, 6 Feb 2022 17:53:53 +0000 (18:53 +0100)
Replace the open coded literal 2 in std.c routines, prefer ARRAY_SIZE()
instead in the GVariant construction. To not confuse that item count with
other literals 2 which are related to avoiding floating point issues by
using an epsilon around an imprecise value. See a larger context for an
illustration of the commit's motivation.

Use literal 2.0 instead of 2 where floating point numbers are involved.
To raise awareness during maintenance.


No differences found