From 49c151e432f27f7275e9332612bd22b9ff938c4c Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Mon, 28 Oct 2024 14:28:05 +0100 Subject: [PATCH] sys/luid: luid_custom() use fixed width int This changes the type of the last parameter of `luid_custom()` to a fixed width integer for consistent behavior among different architectures. --- sys/include/luid.h | 2 +- sys/luid/luid.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/include/luid.h b/sys/include/luid.h index 870865b3a39c..86df1623611e 100644 --- a/sys/include/luid.h +++ b/sys/include/luid.h @@ -180,7 +180,7 @@ void luid_netdev_get_eui64(const netdev_t *netdev, eui64_t *addr); * @param[in] len length of the LUID in bytes * @param[in] gen custom LUID generator value */ -void luid_custom(void *buf, size_t len, int gen); +void luid_custom(void *buf, size_t len, uint16_t gen); /** * @brief Get a LUID base value diff --git a/sys/luid/luid.c b/sys/luid/luid.c index bb7079409ecf..ca20221c3956 100644 --- a/sys/luid/luid.c +++ b/sys/luid/luid.c @@ -67,7 +67,7 @@ void luid_get_lb(void *buf, size_t len) ((uint8_t *)buf)[len - 1] ^= lastused++; } -void luid_custom(void *buf, size_t len, int gen) +void luid_custom(void *buf, size_t len, uint16_t gen) { luid_base(buf, len);