Mark {_len,}_memstrcmp inline
authornorly <ny-git@enpas.org>
Mon, 7 Mar 2022 21:39:34 +0000 (22:39 +0100)
committernorly <ny-git@enpas.org>
Mon, 7 Mar 2022 21:39:34 +0000 (22:39 +0100)
module/elmcan.c

index 663c19ef142c7157742a99650f0eda7c5a7227db..1fc57895b0eaec0e0ff02ef0388f388ce2bff2f8 100644 (file)
@@ -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);