Source-Changes-HG archive

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

[src/trunk]: src/sbin/gpt Avoiding having parameter name shadow its own funct...



details:   https://anonhg.NetBSD.org/src/rev/21f49d2d8bff
branches:  trunk
changeset: 348136:21f49d2d8bff
user:      kre <kre%NetBSD.org@localhost>
date:      Wed Oct 05 03:06:24 2016 +0000

description:
Avoiding having parameter name shadow its own function's name.
Strictly this shouldnt be (and hasn't been for almost a year) a problem,
but there are compilers that warn about locals shadowing globals (which
this is/was) and it is easy to avoid, so ...    No functinal difference.

diffstat:

 sbin/gpt/show.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r fc2ddfb8c220 -r 21f49d2d8bff sbin/gpt/show.c
--- a/sbin/gpt/show.c   Tue Oct 04 23:52:02 2016 +0000
+++ b/sbin/gpt/show.c   Wed Oct 05 03:06:24 2016 +0000
@@ -33,7 +33,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/show.c,v 1.14 2006/06/22 22:22:32 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: show.c,v 1.38 2016/06/09 17:43:36 kre Exp $");
+__RCSID("$NetBSD: show.c,v 1.39 2016/10/05 03:06:24 kre Exp $");
 #endif
 
 #include <sys/bootblock.h>
@@ -158,7 +158,7 @@
 }
 
 static int
-show(gpt_t gpt, int show)
+show(gpt_t gpt, int xshow)
 {
        map_t m;
 
@@ -178,7 +178,7 @@
                        printf("     ");
                putchar(' ');
                putchar(' ');
-               print_part_type(m->map_type, show, m->map_data, m->map_start);
+               print_part_type(m->map_type, xshow, m->map_data, m->map_start);
                putchar('\n');
                m = m->map_next;
        }



Home | Main Index | Thread Index | Old Index