Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst For the benefit of gcc 4.5, rename a local ...



details:   https://anonhg.NetBSD.org/src/rev/52318989dd78
branches:  trunk
changeset: 802411:52318989dd78
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Sep 13 17:22:22 2014 +0000

description:
For the benefit of gcc 4.5, rename a local "nl" variable to "nline",
so it doesn't collide with the global curses nl() function.

diffstat:

 usr.sbin/sysinst/net.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (51 lines):

diff -r e92240237371 -r 52318989dd78 usr.sbin/sysinst/net.c
--- a/usr.sbin/sysinst/net.c    Sat Sep 13 17:18:45 2014 +0000
+++ b/usr.sbin/sysinst/net.c    Sat Sep 13 17:22:22 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net.c,v 1.14 2014/09/13 09:46:12 roy Exp $     */
+/*     $NetBSD: net.c,v 1.15 2014/09/13 17:22:22 martin Exp $  */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -602,7 +602,7 @@
                /* try a dhcp configuration */
                dhcp_config = config_dhcp(net_dev);
                if (dhcp_config) {
-                       char *nl;
+                       char *nline;
 
                        /* Get newly configured data off interface. */
                        get_ifinterface_info();
@@ -624,8 +624,8 @@
                                strlcpy(net_defroute, textbuf,
                                    sizeof net_defroute);
                        free(textbuf);
-                       if ((nl = strchr(net_defroute, '\n')))
-                               *nl = '\0';
+                       if ((nline = strchr(net_defroute, '\n')))
+                               *nline = '\0';
 
                        /* pull nameserver info out of /etc/resolv.conf */
                        if (collect(T_OUTPUT, &textbuf,
@@ -637,8 +637,8 @@
                                strlcpy(net_namesvr, textbuf,
                                    sizeof net_namesvr);
                        free(textbuf);
-                       if ((nl = strchr(net_namesvr, '\n')))
-                               *nl = '\0';
+                       if ((nline = strchr(net_namesvr, '\n')))
+                               *nline = '\0';
                        if (net_namesvr[0] != '\0')
                                net_dhcpconf |= DHCPCONF_NAMESVR;
 
@@ -664,8 +664,8 @@
                                            sizeof net_domain);
                                free(textbuf);
                        }
-                       if ((nl = strchr(net_domain, '\n')))
-                               *nl = '\0';
+                       if ((nline = strchr(net_domain, '\n')))
+                               *nline = '\0';
                        if (net_domain[0] != '\0')
                                net_dhcpconf |= DHCPCONF_DOMAIN;
 



Home | Main Index | Thread Index | Old Index