mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 23:54:08 +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;
|
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) {
|
for (; n; --n, ++s) {
|
||||||
if (*s == c)
|
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>
|
* @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
|
/* 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'
|
* so, return 1 and, if afterp is not NULL, set *afterp to point to the character in 'str'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user