mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 21:47:45 +00:00
Avoid a name conflict in a local variable
Modern compilers will warn when a variable in a nested scope hiding a variable of the same name in an outer scope. One of the arguments to afs_lhash_remove() is already named 'data'; don't reuse that name for a local variable. Change-Id: Icbb5010d298110cd4dab395fc5eec45e01ec9ba3 Reviewed-on: http://gerrit.openafs.org/11371 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
64da7c133a
commit
59e9b3b409
@ -406,7 +406,7 @@ afs_lhash_remove(afs_lhash * lh, unsigned key, const void *data)
|
||||
pprev = &cur->next, cur = cur->next) {
|
||||
lh->remove_tests++;
|
||||
if (lh->equal(data, cur->data)) {
|
||||
void *data = cur->data;
|
||||
void *ptr = cur->data;
|
||||
|
||||
if (pprev) {
|
||||
*pprev = cur->next;
|
||||
@ -418,7 +418,7 @@ afs_lhash_remove(afs_lhash * lh, unsigned key, const void *data)
|
||||
|
||||
lh->ndata--;
|
||||
|
||||
return data;
|
||||
return ptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user