First period not last for host_short, from Michael Scholz.

This commit is contained in:
Nicholas Marriott 2013-10-01 23:24:39 +01:00
parent 21bca549d3
commit 884a21d0f5

View File

@ -121,7 +121,7 @@ format_create(void)
if (gethostname(host, sizeof host) == 0) {
format_add(ft, "host", "%s", host);
if ((ptr = strrchr(host, '.')) != NULL)
if ((ptr = strchr(host, '.')) != NULL)
*ptr = '\0';
format_add(ft, "host_short", "%s", host);
}