-
- /* We don't remove names that are gone. But that should be
- * fine and should probably be fixed only on a configuration
- * refresh. */
-
- if (names) {
- FOREACH_WORD(w, l, names, state) {
- char *e;
-
- if (!(e = strndup(w, l))) {
- r = -ENOMEM;
- goto fail;
- }
-
- r = unit_add_name(u, e);
- free(e);
-
- if (r < 0 && r != -EEXIST)
- goto fail;
- }
- }