X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Foptions.c;h=87a902fc0bb87524b878f14656afbb886aba4be0;hp=13969c40b442760ac4a8af69c732611861864abd;hb=4731734c0bcadc7119bd7dae9b9056a151f9c3ee;hpb=68497c7d9717fc53f7864d6555be1e0b5e15e696;ds=sidebyside 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;