]> git.ipfire.org Git - thirdparty/systemd.git/commit
env-file: cleanups for write_env_file_label() main
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 4 Aug 2026 01:12:05 +0000 (10:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 4 Aug 2026 05:37:52 +0000 (14:37 +0900)
commit2bb1f6a651233ec799ec78c0f56f6dc47ebd1f29
tree13c3801109fedfa119936c4ae45d8321dfc2c5aa
parent23058066e6c02fad124e9ad8c71d0854440bd586
env-file: cleanups for write_env_file_label()

Explicitly call label_ops_post() where necessary with specific
arguments. Previously, regardless if fopen_tmpfile_linkable_at()
success, label_ops_post() was called but its argument was heavily
conditionalized. Let's call it both on failure and success cases
with specific arguments. This should be easy to read.

This also
- moves variable declarations where used,
- drops unnecessary boolean flag call_label_ops_post.

No functional change. Just reafactoring.

Hopefully silence CID#1664328, though it is false-positive.
src/basic/env-file.c