mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +00:00
Fix wrong declaration of strnchr()
This commit is contained in:
parent
4648f5096a
commit
133c34325f
2
str.c
2
str.c
@ -88,7 +88,7 @@ char *str_toupper_inplace(char *str)
|
||||
return str;
|
||||
}
|
||||
|
||||
int strnchr(const char *s, size_t n, char c)
|
||||
const char *strnchr(const char *s, size_t n, char c)
|
||||
{
|
||||
for (; n; --n, ++s) {
|
||||
if (*s == c)
|
||||
|
2
str.h
2
str.h
@ -91,7 +91,7 @@ size_t str_fromprint(unsigned char *dst, const char *src);
|
||||
*
|
||||
* @author Andrew Bettison <andrew@servalproject.com>
|
||||
*/
|
||||
int strnchr(const char *s, size_t n, char c);
|
||||
const char *strnchr(const char *s, size_t n, char c);
|
||||
|
||||
/* Check if a given nul-terminated string 'str' starts with a given nul-terminated sub-string. If
|
||||
* so, return 1 and, if afterp is not NULL, set *afterp to point to the character in 'str'
|
||||
|
Loading…
Reference in New Issue
Block a user