First period not last for host_short, from Michael Scholz.

pull/1/head
Nicholas Marriott 2013-10-01 23:24:39 +01:00
parent 21bca549d3
commit 884a21d0f5
1 changed files with 1 additions and 1 deletions

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);
}