chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit_merge() needs a proper review
[elogind.git]
/
unit.c
diff --git
a/unit.c
b/unit.c
index e6e5574312161668f8b7133010cd815bc2267d85..88615319d7c28ee64e1db4a84abe0836c5ebddd9 100644
(file)
--- a/
unit.c
+++ b/
unit.c
@@
-62,6
+62,9
@@
bool unit_name_is_valid(const char *n) {
if (!(e = strrchr(n, '.')))
return false;
if (!(e = strrchr(n, '.')))
return false;
+ if (e == n)
+ return false;
+
for (i = n; i < e; i++)
if (!strchr(VALID_CHARS, *i))
return false;
for (i = n; i < e; i++)
if (!strchr(VALID_CHARS, *i))
return false;
@@
-240,7
+243,8
@@
static int ensure_merge(Set **s, Set *other) {
return 0;
}
return 0;
}
-/* FIXME: Does not rollback on failure! */
+/* FIXME: Does not rollback on failure! Needs to fix special unit
+ * pointers. Needs to merge names and dependencies properly.*/
int unit_merge(Unit *u, Unit *other) {
int r;
UnitDependency d;
int unit_merge(Unit *u, Unit *other) {
int r;
UnitDependency d;