core/mount: remove one more unused temporary variable

Similar to 3cea9c403c,
but for mount_get_what_escaped().
This commit is contained in:
Mike Yuan
2025-10-09 18:24:56 +02:00
parent a35780d5d0
commit a8fe8e8344
+3 -8
View File
@@ -2415,7 +2415,6 @@ char* mount_get_where_escaped(const Mount *m) {
}
char* mount_get_what_escaped(const Mount *m) {
_cleanup_free_ char *escaped = NULL;
const char *s = NULL;
assert(m);
@@ -2424,14 +2423,10 @@ char* mount_get_what_escaped(const Mount *m) {
s = m->parameters_proc_self_mountinfo.what;
else if (m->from_fragment && m->parameters_fragment.what)
s = m->parameters_fragment.what;
if (!s)
return strdup("");
if (s) {
escaped = utf8_escape_invalid(s);
if (!escaped)
return NULL;
}
return escaped ? TAKE_PTR(escaped) : strdup("");
return utf8_escape_invalid(s);
}
char* mount_get_options_escaped(const Mount *m) {