util: use SPECIAL_ROOT_SLICE macro where appropriate
This commit is contained in:
parent
0474ef7b3e
commit
e5d855d364
|
@ -1666,7 +1666,7 @@ int cg_path_get_slice(const char *p, char **slice) {
|
||||||
if (!e) {
|
if (!e) {
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
s = strdup("-.slice");
|
s = strdup(SPECIAL_ROOT_SLICE);
|
||||||
if (!s)
|
if (!s)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -1821,7 +1821,7 @@ int cg_slice_to_path(const char *unit, char **ret) {
|
||||||
assert(unit);
|
assert(unit);
|
||||||
assert(ret);
|
assert(ret);
|
||||||
|
|
||||||
if (streq(unit, "-.slice")) {
|
if (streq(unit, SPECIAL_ROOT_SLICE)) {
|
||||||
char *x;
|
char *x;
|
||||||
|
|
||||||
x = strdup("");
|
x = strdup("");
|
||||||
|
|
Loading…
Reference in a new issue