assert(u);
if (isempty(rvalue)) {
- char **empty;
-
- /* Empty assignment resets the list. As a special rule
- * we actually fill in a real empty array here rather
- * than NULL, since some code wants to know if
- * something was set at all... */
- empty = new0(char*, 1);
- if (!empty)
- return log_oom();
-
- strv_free(*x);
- *x = empty;
-
+ *x = strv_free(*x);
return 0;
}
assert(u);
if (isempty(rvalue)) {
- char **empty;
-
- empty = new0(char*, 1);
- if (!empty)
- return log_oom();
-
- strv_free(*users);
- *users = empty;
-
+ *users = strv_free(*users);
return 0;
}