Use an explicit symbol for uninitialized vnode types
authorBenjamin Kaduk <kaduk@mit.edu>
Fri, 10 Jan 2014 05:00:52 +0000 (00:00 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Fri, 17 Jan 2014 18:39:56 +0000 (10:39 -0800)
Avoid trying to get clever with stuffing -1 into an unsigned bitfield,
which causes the value to change and generates a warning from clang.
Just use vNull, which is intended to be used for uninitialized/empty
vnodes.

Change-Id: I5662887e5a68c7e687025d19226f821d8f2d6a09
Reviewed-on: http://gerrit.openafs.org/10701
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/tools/dumpscan/dumptool.c

index be8d575..70b2ec7 100644 (file)
@@ -918,7 +918,7 @@ ScanVnodes(FILE * f, VolumeDiskData * vol, int sizescan)
 
        offset = 0;
        length = 0;
-       vnode->type = -1;
+       vnode->type = vNull;
        vnode->length = -1;
 
        if (ReadInt32(f, (uint32_t *) & vnodeNumber)) {
@@ -1064,7 +1064,7 @@ ScanVnodes(FILE * f, VolumeDiskData * vol, int sizescan)
         * just skip it (because we can't do anything with it.
         */
 
-       if (vnode->type == -1)
+       if (vnode->type == vNull)
            continue;
 
 #ifdef RESIDENCY