mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
unicode: simplify utf8len
Just use the utf8nlen implementation with a (size_t)-1 len argument, similar to utf8_lookup. Also move the function to utf8-selftest.c, as it isn't used anywhere else. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
This commit is contained in:
parent
379210db48
commit
9012d79cf0
3 changed files with 5 additions and 31 deletions
|
@ -160,6 +160,11 @@ static const struct {
|
|||
}
|
||||
};
|
||||
|
||||
static ssize_t utf8len(const struct utf8data *data, const char *s)
|
||||
{
|
||||
return utf8nlen(data, s, (size_t)-1);
|
||||
}
|
||||
|
||||
static void check_utf8_nfdi(void)
|
||||
{
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue