]> git.ipfire.org Git - thirdparty/systemd.git/commit
string-util: add new strdupcspn()/strdupspn()
authorLennart Poettering <lennart@poettering.net>
Fri, 20 Jan 2023 12:14:42 +0000 (13:14 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 20 Jan 2023 16:27:51 +0000 (17:27 +0100)
commite8bec6242bf763afa7de7843d1daae567651c249
tree9aba006f260fa4748530edc19fcf6f7a5bd9351d
parent71c6f0ac524e174800a23410b121bee45f9e3f67
string-util: add new strdupcspn()/strdupspn()

These combine strndup() + strspn()/strcspn() into one.

There are a bunch of strndupa() calls that could use similar treatment
(or should be converted to strdup[c]spn(), but this commit doesn't
bother with that.
src/basic/fileio.c
src/basic/hostname-util.c
src/basic/string-util.c
src/basic/string-util.h
src/binfmt/binfmt.c
src/locale/localed-util.c
src/shared/discover-image.c
src/shared/logs-show.c