On Tue, Jun 25, 2019 at 09:31:45AM +0200, Rouven Czerwinski wrote: > This fixes a compiler warning because len is size_t and > RNG_FAIL_EVENT_SIZE was cast to uint32_t. > > Signed-off-by: Rouven Czerwinski <r.czerwinski@xxxxxxxxxxxxxx> > --- > drivers/hab/habv4.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks Sascha > > diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c > index 496fbe3ccd..2e3e349b0b 100644 > --- a/drivers/hab/habv4.c > +++ b/drivers/hab/habv4.c > @@ -419,7 +419,7 @@ static bool is_known_rng_fail_event(const uint8_t *data, size_t len) > int i; > for (i = 0; i < ARRAY_SIZE(habv4_known_rng_fail_events); i++) { > if (memcmp(data, habv4_known_rng_fail_events[i], > - min(len, (uint32_t)RNG_FAIL_EVENT_SIZE)) == 0) { > + min_t(size_t, len, RNG_FAIL_EVENT_SIZE)) == 0) { > return true; > } > } > -- > 2.22.0 > > > _______________________________________________ > barebox mailing list > barebox@xxxxxxxxxxxxxxxxxxx > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox