+int read_etc_hostname_distro(const char *path, char **ret) {
+ int r;
-+ char *p;
++ char *p = NULL;
+ r = parse_env_file(NULL, "/etc/sysconfig/network", NEWLINE, "HOSTNAME", &p, NULL);
+ if (r < 0)
+ return r;
+ int r;
path = "/etc/hostname";
+ r = read_etc_hostname_distro(path, ret);
-+ if (r > 0)
++ if (r == 0)
+ return r;
+ }