From: norly Date: Mon, 7 Mar 2022 21:39:34 +0000 (+0100) Subject: Mark {_len,}_memstrcmp inline X-Git-Url: https://git.enpas.org/?p=elmcan.git;a=commitdiff_plain;h=dcb1fe3ede575ddc323ffd1316a14770df9ff8e2 Mark {_len,}_memstrcmp inline --- 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);