]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/utf8.c
utf8: update utf8_is_valid() a bit
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Jul 2018 10:21:39 +0000 (12:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 Sep 2018 13:57:47 +0000 (15:57 +0200)
commite71fb4b3020dd5881d8a55d169deb02b4c5f9638
treea19bbca4fe7cd1370ad187693f71bb49ffe600bc
parent2b5d05fdfeb0e925bfc005cc48723ec25ce9c712
utf8: update utf8_is_valid() a bit

Let's avoid a few casts in the function. Also, let's drop the "const"
when returning the string, for similar reasons as strchr() and friends
drop it: so that we don't add a const if the user passes in a non-const
string.
src/basic/utf8.c
src/basic/utf8.h