Demand Attach: Simplify __VVGC_entry_cl_add
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sun, 25 Apr 2010 19:23:27 +0000 (20:23 +0100)
committerDerrick Brashear <shadow@dementia.org>
Mon, 17 May 2010 12:37:51 +0000 (05:37 -0700)
commit6fd1db1a86e830b3758772a79f25c30080c4dd06
treef6adcd158165cac42a949ed57866a83b9a4c7033
parent44da0b32ee192017a080e26037e4f4b18e90717c
Demand Attach: Simplify __VVGC_entry_cl_add

The __VVGC_entry_cl_add was giving an uninitialised variable warning
for empty_idx, because it was using a separate variable, empty_found
as a sentinel for when empty_idx was holding a real value. Simplify all
of this by removing the sentinel, and making empty_idx being -1 mean
'not found', and a real value imply found.

Change-Id: I6c485993df1ff8dfd27824234c811af998ff94fa
Reviewed-on: http://gerrit.openafs.org/1833
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/vg_cache.c