chiark / gitweb /
string-util: optimize strshorten() a bit
authorLennart Poettering <lennart@poettering.net>
Thu, 20 Jul 2017 12:17:30 +0000 (14:17 +0200)
committerSven Eden <yamakuzure@gmx.net>
Thu, 20 Jul 2017 12:17:30 +0000 (14:17 +0200)
commitdd5771a663622a14e16971f2afb119fb91c6fade
treeb2363d03db22a726479354791754052f9a08fd0f
parent07d8f20b72e7e18c0e06aa152264c1abbdd09609
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