chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prep v225: Applying various fixes and changes to src/basic that got lost during git...
[elogind.git]
/
src
/
basic
/
unit-name.c
diff --git
a/src/basic/unit-name.c
b/src/basic/unit-name.c
index 5dac442b1b110fb132ac5ddc5bcd61a1fceaf6f4..f8965262c1130c806250532d44160554214fa247 100644
(file)
--- a/
src/basic/unit-name.c
+++ b/
src/basic/unit-name.c
@@
-687,6
+687,7
@@
int unit_name_mangle_with_suffix(const char *name, UnitNameMangle allow_globs, c
#if 0
int slice_build_parent_slice(const char *slice, char **ret) {
char *s, *dash;
#if 0
int slice_build_parent_slice(const char *slice, char **ret) {
char *s, *dash;
+ int r;
assert(slice);
assert(ret);
assert(slice);
assert(ret);
@@
-707,11
+708,11
@@
int slice_build_parent_slice(const char *slice, char **ret) {
if (dash)
strcpy(dash, ".slice");
else {
if (dash)
strcpy(dash, ".slice");
else {
+ r = free_and_strdup(&s, "-.slice");
+ if (r < 0) {
free(s);
free(s);
-
- s = strdup("-.slice");
- if (!s)
- return -ENOMEM;
+ return r;
+ }
}
*ret = s;
}
*ret = s;