]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/utf8.h
utf8: modernize utf16 inline calls a bit
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Jul 2018 10:23:31 +0000 (12:23 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 Sep 2018 13:57:47 +0000 (15:57 +0200)
commit07667be733e1976bb7864bf54ad7c03e9464ee87
tree89bb22f8d7193995bfd7c04a93a846610011d45a
parente71fb4b3020dd5881d8a55d169deb02b4c5f9638
utf8: modernize utf16 inline calls a bit

Let's fix an indentation issue.

Let's avoid yoda comparisons.

Let's drop unnecessary ().

Let's make sure we convert 16bit values to 32bit before shifting them by
10bit to the left, to avoid overflows.

Let's avoid comparisons between signed literals and unsigned variables,
in particular if the literals are outside of the minimum range C
requires for "int".
src/basic/utf8.h