From: NeilBrown Date: Tue, 4 Nov 2008 09:50:38 +0000 (+1100) Subject: Always set 'homehost' if not specified. X-Git-Tag: mdadm-3.0-devel2~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9180c81bd7f4f3dd2fb9f2835894d8c0e9488dbd;p=thirdparty%2Fmdadm.git Always set 'homehost' if not specified. The default for 'homehost' is now '' rather than unspecified. --- diff --git a/mdadm.c b/mdadm.c index b2ec6f90..f830a8dd 100644 --- a/mdadm.c +++ b/mdadm.c @@ -997,7 +997,7 @@ int main(int argc, char *argv[]) if (homehost == NULL) homehost = conf_get_homehost(); - if (homehost && strcmp(homehost, "")==0) { + if (homehost == NULL || strcmp(homehost, "")==0) { if (gethostname(sys_hostname, sizeof(sys_hostname)) == 0) { sys_hostname[sizeof(sys_hostname)-1] = 0; homehost = sys_hostname;