]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/calendarspec.c
basic: use the return value of endswith
authorHristo Venev <hristo@venev.name>
Sun, 25 Oct 2015 16:24:39 +0000 (18:24 +0200)
committerHristo Venev <hristo@venev.name>
Sun, 25 Oct 2015 16:46:20 +0000 (18:46 +0200)
commit078efddd37c3d6e77525bb19eadfd159538df228
tree4a1e3a8fea37124cf206ba9c7af37176806f7309
parent1e23792147b675cf6d3d7e85d02ba3d4dcc886c1
basic: use the return value of endswith

It returns the position where the suffix begins, which can be used for
strndup to extract the prefix without calling strlen.
src/basic/calendarspec.c
src/basic/time-util.c