]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/string-util.c
string-util: optimize strshorten() a bit
authorLennart Poettering <lennart@poettering.net>
Thu, 20 Jul 2017 12:17:30 +0000 (14:17 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 31 Jul 2017 16:20:28 +0000 (18:20 +0200)
commit47b33c7d5284492e5679ccfabafe8c9738de8cb3
treecfcb7547b8dee46bf30ac2b088734593f7649d1b
parentc165d97d16f24c9c28d9574ed82b3a6669408ca5
string-util: optimize strshorten() a bit

There's no reason to determine the full length of the string, it's
sufficient to know whether it is larger than the intended size...
src/basic/string-util.c