chiark / gitweb /
util-lib: introduce new empty_or_root() helper (#8746)
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Apr 2018 12:20:49 +0000 (14:20 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commite5e0c80fdfa8861931df799574d5a60c96b6aa13
tree3ff055d308feb83a85c3d8a2edd0eb9ebcfd42a4
parentd1dbf40d47cfa883c4c9fa264dfd84cd57a03b85
util-lib: introduce new empty_or_root() helper (#8746)

We check the same condition at various places. Let's add a trivial,
common helper for this, and use it everywhere.

It's not going to make things much faster or much shorter, but I think a
lot more readable
src/basic/cgroup-util.c
src/basic/fs-util.c
src/basic/path-util.c
src/basic/path-util.h
src/basic/unit-name.c
src/basic/user-util.c
src/core/cgroup.c
src/test/test-path-util.c