OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-2794-gb725a28

Gerrit Code Review gerrit@openafs.org
Sat, 28 Jul 2012 10:37:20 -0700 (PDT)


The following commit has been merged in the master branch:
commit b725a28eac2d9a94344b2524f995a98e60ecc2ea
Author: Garrett Wollman <wollman@csail.mit.edu>
Date:   Sat Jul 28 01:10:09 2012 -0400

    volser: restructure GetNextVol and clients to remove duplicate code
    
    There are several odd-looking but stylized loops involving GetNextVol()
    which can be radically simplified if only GetNextVol() would return
    a meaningful value.  Move all of the code that skips non-volume-header
    files in the directory into GetNextVol and have it return a truth value
    (instead of always returning zero) that indicates whether it saw
    something that looks like a volume header.  Then all the odd while
    loops and strcmps just collapse into while(GetNextVol(...)).
    
    GetNextVol() had external scope, but there are no callers in the
    tree that use it outside of volprocs.c, and it's not part of a
    public library interface, so make it static.
    
    While here, don't strcmp() past the end of a filename that begins with
    'V' but is too short to be a valid volume name.
    
    Change-Id: I214b33c46714959d700608b3d3718c79d3792878
    Reviewed-on: http://gerrit.openafs.org/7893
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@dementix.org>

 src/vol/voldefs.h     |    1 +
 src/volser/volprocs.c |  114 ++++++++++++-------------------------------------
 2 files changed, 28 insertions(+), 87 deletions(-)

-- 
OpenAFS Master Repository