+ const char *p;
+
+ /* If the passed hostname is already valid, then
+ * assume the user doesn't know anything about pretty
+ * hostnames, so let's unset the pretty hostname, and
+ * just set the passed hostname as static/dynamic
+ * hostname. */
+
+ if (hostname_is_valid(hostname))
+ p = "";
+ else {
+ p = hostname;
+
+ h = strdup(hostname);
+ if (!h)
+ return log_oom();
+
+ hostname = hostname_simplify(h);
+ }
+