]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/transaction.c
core/transaction: make merge_unit_ids() always return NUL-terminated string
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Mar 2023 03:12:01 +0000 (12:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Mar 2023 03:12:05 +0000 (12:12 +0900)
commit366eced4c81a15a25b9225347fa203aa67798b02
tree6b7d4637e8050180e27f4894f89c3000a9d67525
parent6c2caf50534a7f7c9e813f6855f7f446dafac584
core/transaction: make merge_unit_ids() always return NUL-terminated string

Follow-up for 924775e8ce49817f96df19c2b06356c12ecfc754.

The loop run with `STRV_FOREACH_PAIR()`, hence `if (*(unit_id+1))` is
not a good way to detect if there exist a next entry.

Fixes #26872.
src/core/transaction.c