From dcb1fe3ede575ddc323ffd1316a14770df9ff8e2 Mon Sep 17 00:00:00 2001 From: norly Date: Mon, 7 Mar 2022 22:39:34 +0100 Subject: [PATCH] Mark {_len,}_memstrcmp inline --- module/elmcan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/elmcan.c b/module/elmcan.c index 663c19e..1fc5789 100644 --- a/module/elmcan.c +++ b/module/elmcan.c @@ -338,7 +338,7 @@ static inline void elm327_hw_failure(struct elmcan *elm) } /* Compare a buffer to a fixed string */ -static int _memstrcmp(const u8 *mem, const char *str) +static inline int _memstrcmp(const u8 *mem, const char *str) { return memcmp(mem, str, strlen(str)); } @@ -349,7 +349,7 @@ static int _memstrcmp(const u8 *mem, const char *str) * buffer, rather than exactly all of it. * - It avoids byte comparisons in case the length doesn't match. */ -static int _len_memstrcmp(const u8 *mem, size_t mem_len, const char *str) +static inline int _len_memstrcmp(const u8 *mem, size_t mem_len, const char *str) { size_t str_len = strlen(str); -- 2.30.2