]> git.ipfire.org Git - thirdparty/systemd.git/commit
fstab-util: clean up fstab_filter_options
authorMike Yuan <me@yhndnzj.com>
Sat, 20 Jan 2024 14:16:52 +0000 (22:16 +0800)
committerMike Yuan <me@yhndnzj.com>
Thu, 25 Jan 2024 17:06:40 +0000 (01:06 +0800)
commit5d19388349415d9835c7a787a0bd18543adf8a0b
tree052f40d8e1083c85b1ad2b956dcf49dfb80102ed
parentc521ce42b43ad542a8e3c6e5e83ceb653ca6a71e
fstab-util: clean up fstab_filter_options

Let's get rid of the confusing goto so that the flow is more
straightforward. Note that the behavior is slightly changed:
previously, ret_filtered would be an empty string even if
the original opts passed in is NULL, but after this commit
it returns NULL too. But this shouldn't matter, as all our
code handles NULL opts gracefully.
src/shared/fstab-util.c
src/shared/fstab-util.h
src/test/test-fstab-util.c