patch-libhfsp_src_btreecheck_c 842 B

12345678910111213141516171819202122
  1. $OpenBSD: patch-libhfsp_src_btreecheck_c,v 1.1 2011/02/06 16:03:55 fgsch Exp $
  2. --- libhfsp/src/btreecheck.c.orig Tue Mar 5 19:50:29 2002
  3. +++ libhfsp/src/btreecheck.c Fri Jan 28 07:34:59 2011
  4. @@ -264,7 +264,7 @@ static int fscheck_btree_init(btree* bt, volume* vol,
  5. {
  6. p = volume_readfromfork(vol, nodebuf, fork, 0, bt->blkpernode,
  7. HFSP_EXTENT_DATA, bt->cnid);
  8. - ((char*) p) += HEADER_RESERVEDOFFSET; // skip header
  9. + p = (((char *)p) + HEADER_RESERVEDOFFSET); // skip header
  10. }
  11. bt->alloc_bits = malloc(alloc_size);
  12. @@ -368,7 +368,7 @@ static void* checkbtree_key_by_index(btree* bt, UInt32
  13. }
  14. // now we have the offset and can read the key ...
  15. #if BYTE_ORDER == LITTLE_ENDIAN
  16. - return buf->node + bswap_16(offset);
  17. + return buf->node + swap16(offset);
  18. #else
  19. return buf->node + offset;
  20. #endif