From 4731734c0bcadc7119bd7dae9b9056a151f9c3ee Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Tue, 4 Jul 1995 12:33:01 +0000 Subject: [PATCH 1/1] Put a dot between hostname and domainname. --- pppd/options.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pppd/options.c b/pppd/options.c index 13969c4..87a902f 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: options.c,v 1.22 1995/06/30 01:52:24 paulus Exp $"; +static char rcsid[] = "$Id: options.c,v 1.23 1995/07/04 12:33:01 paulus Exp $"; #endif #include @@ -1133,8 +1133,9 @@ setdomain(argv) char **argv; { gethostname(hostname, MAXNAMELEN); - if (*argv != 0) { - strncat(hostname, ".", MAXNAMELEN - strlen(hostname)); + if (**argv != 0) { + if (**argv != '.') + strncat(hostname, ".", MAXNAMELEN - strlen(hostname)); strncat(hostname, *argv, MAXNAMELEN - strlen(hostname)); } hostname[MAXNAMELEN-1] = 0; -- 2.39.2