]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/strv.h
tree-wide: replace strv_split_full() with strv_split_extract() everywhere
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 31 Jul 2020 14:21:14 +0000 (16:21 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 9 Sep 2020 07:34:55 +0000 (09:34 +0200)
commit0645b83a40d1c782f173c4d8440ab2fc82a75006
tree03c9733aec1d24b4ae6578c14f8ef01b107a6900
parentd59d954d7f6f5f3772b12e8078875183e0b27889
tree-wide: replace strv_split_full() with strv_split_extract() everywhere

Behaviour is not identical, as shown by the tests in test-strv.
The combination of EXTRACT_UNQUOTE without EXTRACT_RELAX only appears in
the test, so it doesn't seem particularly important. OTOH, the difference
in handling of squished parameters could make a difference. New behaviour
is what both bash and python do, so I think we can ignore this corner case.

This change has the following advantages:
- the duplication of code paths that do a very similar thing is removed
- extract_one_word() / strv_split_extract() return a proper error code.
src/basic/strv.c
src/basic/strv.h
src/test/test-strv.c
src/udev/udev-builtin.c
src/udev/udev-event.c
src/xdg-autostart-generator/xdg-autostart-service.c