chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: automatically turn paths and unescaped unit names into proper unit names
[elogind.git]
/
src
/
core
/
device.c
diff --git
a/src/core/device.c
b/src/core/device.c
index cd0a09954620b0396f11c59d3172ca09d0001783..f4c59b3a510de5de20511d67667740d52029bb62 100644
(file)
--- a/
src/core/device.c
+++ b/
src/core/device.c
@@
-144,7
+144,8
@@
static int device_add_escaped_name(Unit *u, const char *dn) {
assert(dn);
assert(dn[0] == '/');
assert(dn);
assert(dn[0] == '/');
- if (!(e = unit_name_from_path(dn, ".device")))
+ e = unit_name_from_path(dn, ".device");
+ if (!e)
return -ENOMEM;
r = unit_add_name(u, e);
return -ENOMEM;
r = unit_add_name(u, e);
@@
-165,7
+166,8
@@
static int device_find_escape_name(Manager *m, const char *dn, Unit **_u) {
assert(dn[0] == '/');
assert(_u);
assert(dn[0] == '/');
assert(_u);
- if (!(e = unit_name_from_path(dn, ".device")))
+ e = unit_name_from_path(dn, ".device");
+ if (!e)
return -ENOMEM;
u = manager_get_unit(m, e);
return -ENOMEM;
u = manager_get_unit(m, e);