summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2025-07-07 14:37:25 +0300
committerTom Rini <trini@konsulko.com>2025-07-14 15:16:40 -0600
commitc28ff2112aa7a7d8a4f4d53e3b39ed9bb03e7f8d (patch)
tree27fb9c80e5d63bd8f4a9165b3425c752fa922d1f
parentd2a5bb2104cd34497cfd36d06c02487813d9a3b5 (diff)
tools: gen_ethaddr_crc: Make functions static
These functions are only used locally. Enabling -Wmissing-prototypes triggers a warning. Mark them as static. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r--tools/gen_ethaddr_crc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/gen_ethaddr_crc.c b/tools/gen_ethaddr_crc.c
index e73d0429a04..27717207580 100644
--- a/tools/gen_ethaddr_crc.c
+++ b/tools/gen_ethaddr_crc.c
@@ -16,12 +16,12 @@
#define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1) /* with separators */
#define ARP_HLEN_LAZY (ARP_HLEN * 2) /* separatorless hardware address length */
-uint8_t nibble_to_hex(const char *nibble, bool lo)
+static uint8_t nibble_to_hex(const char *nibble, bool lo)
{
return (strtol(nibble, NULL, 16) << (lo ? 0 : 4)) & (lo ? 0x0f : 0xf0);
}
-int process_mac(const char *mac_address)
+static int process_mac(const char *mac_address)
{
uint8_t ethaddr[ARP_HLEN + 1] = { 0x00 };
uint_fast8_t i = 0;
@@ -45,7 +45,7 @@ int process_mac(const char *mac_address)
return 0;
}
-void print_usage(char *cmdname)
+static void print_usage(char *cmdname)
{
printf("Usage: %s <mac_address>\n", cmdname);
puts("<mac_address> may be with or without separators.");