Salvager: Don't use garbage vnodes when Testing
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Tue, 15 Jun 2010 18:20:50 +0000 (19:20 +0100)
committerDerrick Brashear <shadow@dementix.org>
Sat, 7 Apr 2012 12:04:48 +0000 (05:04 -0700)
commit047ff7e9fd283f67ede2b873e3ad64ebbcf8d3ef
tree44e9c106d9c9f71b8243ce5f54884d3520bf835c
parent8648a8c45b593dce8982deec41e3caf48e80dc0c
Salvager: Don't use garbage vnodes when Testing

If Testing is true, and the salvage wants to repair the '.' file,
then it will end up using a garbage value as the location of the
repaired file (vnodeNumber gets set to fid.Vnode, but fid.Vnode is
uninitialised)

Fix this by making it behave as if no repair is necessary when running
in Testing mode. It's unclear that this is entirely the correct answer,
but it's definitely better than the current behaviour.

Caught by clang-analyzer

Change-Id: I1bddd889b3350cf31fe6384573e49e82159c7095
Reviewed-on: http://gerrit.openafs.org/7071
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/vol/vol-salvage.c