fix a small invariant bug while reading brtheader off disk

git-svn-id: file:///svn/toku/tokudb@35947 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
John Esmet 2013-04-16 23:59:53 -04:00 committed by Yoni Fogel
parent c6f8d00ec7
commit d7dcad8d66

View file

@ -1962,10 +1962,10 @@ deserialize_brtheader_versioned (int fd, struct rbuf *rb, struct brt_header **br
struct brt_header *h = NULL;
rval = deserialize_brtheader (fd, rb, &h); //deserialize from rbuf and fd into header
invariant ((uint32_t) h->layout_version == version);
deserialize_descriptor_from(fd, h->blocktable, &(h->descriptor), version);
if (rval == 0) {
invariant(h);
invariant((uint32_t) h->layout_version == version);
deserialize_descriptor_from(fd, h->blocktable, &(h->descriptor), version);
switch (version) {
case BRT_LAYOUT_VERSION_13:
invariant(h->layout_version == BRT_LAYOUT_VERSION_13);