Home
last modified time | relevance | path

Searched hist:a065eccb (Results 1 – 1 of 1) sorted by relevance

/openbmc/libpldm/src/
H A Dmsgbuf.ha065eccb Thu Oct 26 23:32:11 CDT 2023 Andrew Jeffery <andrew@codeconstruct.com.au> msgbuf: Drop unnecessary buffer size arithmetic in array helpers

If we're going to multiply we need to guard against the result
overflowing. However, we don't need to multiply to derive `len` as the
sizeof() expression always evaluates to 1 by definition, yielding
`count`.

Drop the derivation of `len` to clarify that overflow can't occur.

Change-Id: I47b8804663518cdbcc70efa2bce14e4edf6702a2
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>