Source-Changes-HG archive

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

[src/trunk]: src/sbin/savecore fix a couple of -Wshadow warnings



details:   https://anonhg.NetBSD.org/src/rev/26c341e24e12
branches:  trunk
changeset: 516888:26c341e24e12
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Nov 01 07:39:38 2001 +0000

description:
fix a couple of -Wshadow warnings

diffstat:

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

diffs (49 lines):

diff -r 4b3c6cb7570d -r 26c341e24e12 sbin/savecore/savecore.c
--- a/sbin/savecore/savecore.c  Thu Nov 01 07:37:36 2001 +0000
+++ b/sbin/savecore/savecore.c  Thu Nov 01 07:39:38 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: savecore.c,v 1.54 2001/09/12 03:14:08 lukem Exp $      */
+/*     $NetBSD: savecore.c,v 1.55 2001/11/01 07:39:38 lukem Exp $      */
 
 /*-
  * Copyright (c) 1986, 1992, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)savecore.c 8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: savecore.c,v 1.54 2001/09/12 03:14:08 lukem Exp $");
+__RCSID("$NetBSD: savecore.c,v 1.55 2001/11/01 07:39:38 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -612,24 +612,24 @@
        DIR *dfd;
        struct dirent *dir;
        struct stat sb;
-       char *dp, devname[MAXPATHLEN + 1];
+       char *dp, device[MAXPATHLEN + 1];
 
        if ((dfd = opendir(_PATH_DEV)) == NULL) {
                syslog(LOG_ERR, "%s: %m", _PATH_DEV);
                exit(1);
        }
-       (void)strcpy(devname, _PATH_DEV);
+       (void)strcpy(device, _PATH_DEV);
        while ((dir = readdir(dfd))) {
-               (void)strcpy(devname + sizeof(_PATH_DEV) - 1, dir->d_name);
-               if (lstat(devname, &sb)) {
-                       syslog(LOG_ERR, "%s: %m", devname);
+               (void)strcpy(device + sizeof(_PATH_DEV) - 1, dir->d_name);
+               if (lstat(device, &sb)) {
+                       syslog(LOG_ERR, "%s: %m", device);
                        continue;
                }
                if ((sb.st_mode & S_IFMT) != type)
                        continue;
                if (dev == sb.st_rdev) {
                        closedir(dfd);
-                       if ((dp = strdup(devname)) == NULL) {
+                       if ((dp = strdup(device)) == NULL) {
                                syslog(LOG_ERR, "%m");
                                exit(1);
                        }



Home | Main Index | Thread Index | Old Index