vldb_check: ntohs ubik header size

The 'size' field in the ubik header is only 16-bits wide. So, we must
use ntohs to convert it, not ntohl. Without this, vldb_check would
emit false-positive "Ubik header size is 0" warnings.

Change-Id: Iaa06b6dc58b7812b359d6096c112e1f3897c60e2
Reviewed-on: http://gerrit.openafs.org/2226
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Andrew Deason 2010-06-21 17:28:10 -05:00 committed by Derrick Brashear
parent 4a1efd664b
commit 591f9b6de9

View File

@ -143,7 +143,7 @@ readUbikHeader(void)
} }
uheader.magic = ntohl(uheader.magic); uheader.magic = ntohl(uheader.magic);
uheader.size = ntohl(uheader.size); uheader.size = ntohs(uheader.size);
uheader.version.epoch = ntohl(uheader.version.epoch); uheader.version.epoch = ntohl(uheader.version.epoch);
uheader.version.counter = ntohl(uheader.version.counter); uheader.version.counter = ntohl(uheader.version.counter);