commit | 03ff5a76b917e1e2b1f012b3c790099a28bd32a6 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Wed Sep 11 13:49:33 2019 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Wed Sep 11 13:50:33 2019 +0200 |
tree | 0f47df984c1c5dd2c307d81aa0f2ebe9ea5bc210 | |
parent | 5ec7cdac6a2a067d4c00c1a1efe5025dc21d1423 [diff] [blame] |
libyang NEW xpath evaluation Not tested once.
diff --git a/src/common.c b/src/common.c index 69245d4..5139826 100644 --- a/src/common.c +++ b/src/common.c
@@ -160,6 +160,17 @@ return new_mem; } +char * +ly_strnchr(const char *s, int c, unsigned int len) +{ + for (; *s != (char)c; ++s, --len) { + if ((*s == '\0') || (!len)) { + return NULL; + } + } + return (char *)s; +} + LY_ERR ly_getutf8(const char **input, unsigned int *utf8_char, size_t *bytes_read) {