Strip newline from the gateway correctly.

This commit is contained in:
roy 2014-09-13 09:30:30 +00:00
parent e7458201e4
commit 2787059b04
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: net.c,v 1.11 2014/09/13 01:11:58 roy Exp $ */
/* $NetBSD: net.c,v 1.12 2014/09/13 09:30:30 roy Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -626,7 +626,7 @@ again:
strlcpy(net_defroute, textbuf,
sizeof net_defroute);
free(textbuf);
if ((nl = strchr(net_namesvr, '\n')))
if ((nl = strchr(net_defroute, '\n')))
*nl = '\0';
/* pull nameserver info out of /etc/resolv.conf */