From 884a21d0f5b5b5b1d19a84b3e2f40a42a0b6105c Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 1 Oct 2013 23:24:39 +0100 Subject: [PATCH] First period not last for host_short, from Michael Scholz. --- format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format.c b/format.c index da939f04..ba4b95b2 100644 --- a/format.c +++ b/format.c @@ -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); }