Avoid shadowing in fdwalk

-Wshadow=local caught this buglet.  fdwalk redeclares "result" in the
inner scope, meaning that this function will always return 0, even on
error.

gdb/ChangeLog
2018-10-04  Tom Tromey  <tom@tromey.com>

	* common/filestuff.c (fdwalk): Remove inner declaration of
	"result".
This commit is contained in:
Tom Tromey
2018-04-22 10:11:32 -06:00
parent ef789dc484
commit b8c888478d
2 changed files with 5 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2018-10-04 Tom Tromey <tom@tromey.com>
* common/filestuff.c (fdwalk): Remove inner declaration of
"result".
2018-10-04 Tom Tromey <tom@tromey.com>
* msp430-tdep.c (msp430_push_dummy_call): Rename inner

View File

@@ -80,7 +80,6 @@ fdwalk (int (*func) (void *, int), void *arg)
{
long fd;
char *tail;
int result;
errno = 0;
fd = strtol (entry->d_name, &tail, 10);