summaryrefslogtreecommitdiffstats
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server.c')
-rw-r--r--server.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/server.c b/server.c
index 56e4d81..cd97262 100644
--- a/server.c
+++ b/server.c
@@ -300,10 +300,9 @@ flxServer *flx_server_new(GMainContext *c) {
/* Get host name */
hn = flx_get_host_name();
- if ((e = strchr(hn, '.')))
- *e = 0;
+ hn[strcspn(hn, ".")] = 0;
- s->hostname = g_strdup_printf("%s.local.", hn);
+ s->hostname = g_strdup_printf("%slocal.", hn);
g_free(hn);
add_default_entries(s);