This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Shadowed function parameter in linux-nat.c
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sat, 26 Feb 2011 15:36:08 -0800
- Subject: [commit] Shadowed function parameter in linux-nat.c
Checking this in.
2011-02-26 Michael Snyder <msnyder@vmware.com>
* linux-low.c (linux_nat_xfer_osdata): Rename local variable so
that it does not shadow a function parameter.
Index: linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-nat.c,v
retrieving revision 1.194
diff -u -p -u -p -r1.194 linux-nat.c
--- linux-nat.c 8 Feb 2011 22:35:57 -0000 1.194
+++ linux-nat.c 26 Feb 2011 23:29:49 -0000
@@ -5145,16 +5145,16 @@ linux_nat_xfer_osdata (struct target_ops
if ((f = fopen (pathname, "r")) != NULL)
{
- size_t len = fread (cmd, 1, sizeof (cmd) - 1, f);
+ size_t length = fread (cmd, 1, sizeof (cmd) - 1, f);
- if (len > 0)
+ if (length > 0)
{
int i;
- for (i = 0; i < len; i++)
+ for (i = 0; i < length; i++)
if (cmd[i] == '\0')
cmd[i] = ' ';
- cmd[len] = '\0';
+ cmd[length] = '\0';
obstack_xml_printf (
&obstack,