projects
/
oddbits.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75b742b
)
* str: missing inline, whitespace
author
Urban Wallasch
<urban.wallasch@freenet.de>
Mon, 28 Oct 2019 19:39:17 +0000
(20:39 +0100)
committer
Urban Wallasch
<urban.wallasch@freenet.de>
Mon, 28 Oct 2019 19:39:17 +0000
(20:39 +0100)
str/str.h
patch
|
blob
|
history
diff --git
a/str/str.h
b/str/str.h
index 849d80e4aebf07d22f7b2b1886a8cff3b22c6249..a14ce7c1325687792782c5fd758e6292e27de090 100644
(file)
--- 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)
*