From: Urban Wallasch Date: Mon, 28 Oct 2019 19:39:17 +0000 (+0100) Subject: * str: missing inline, whitespace X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=6ff38e64b641dfbb5151c2a6d5ebc98df55b0358;p=oddbits.git * str: missing inline, whitespace --- diff --git a/str/str.h b/str/str.h index 849d80e..a14ce7c 100644 --- a/str/str.h +++ b/str/str.h @@ -375,6 +375,7 @@ static inline char *str_tolower(char *s) { return s; } + /* * str_nlen - determine the length of a fixed-size string * @@ -387,13 +388,14 @@ static inline char *str_tolower(char *s) { * or maxlen if there is no null byte ('\0') among the first maxlen * characters in string s. */ -static size_t str_nlen(char *s, size_t maxlen) { +static inline size_t str_nlen(char *s, size_t maxlen) { size_t n; for (n = 0; n < maxlen && s[n]; ++n) ; return n; } + /* * str_ncpy - copy initial part of a string (a better strncpy) *