drop the old string API fully.
[apps/madmutt.git] / init.c
diff --git a/init.c b/init.c
index 624ef3b..fdaf0c9 100644 (file)
--- a/init.c
+++ b/init.c
@@ -2617,7 +2617,7 @@ void mutt_init (int skip_sys_rc, LIST * commands)
   uname (&utsname);
   /* some systems report the FQDN instead of just the hostname */
   if ((p = strchr (utsname.nodename, '.'))) {
-    Hostname = str_substrdup (utsname.nodename, p);
+    Hostname = p_dupstr(utsname.nodename, p - utsname.nodename);
     p++;
     m_strcpy(buffer, sizeof(buffer), p);       /* save the domain for below */
   }