]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/hfs/hfscommon/Catalog/Catalog.c
xnu-124.7.tar.gz
[apple/xnu.git] / bsd / hfs / hfscommon / Catalog / Catalog.c
index c71d5c7f9512d74cdd82bb1a0e621ee9f021faa3..d200f63ecf9f84701c98a4ca3ac13f57a69be9ca 100644 (file)
@@ -797,7 +797,6 @@ GetDirEntrySize(BTreeIterator *bip, ExtendedVCB * vol)
                                    cnp->ustr.length * sizeof(UniChar), ':', 0);
                if (utf8chars > kdirentMaxNameBytes)
                        utf8chars = kdirentMaxNameBytes;
-               utf8chars++;  /* account for NULL termination */
        } else { /* hfs */
                cnp = (CatalogName*) ckp->hfs.nodeName;
                result = hfs_to_utf8(vol, cnp->pstr, kdirentMaxNameBytes + 1,
@@ -817,7 +816,7 @@ GetDirEntrySize(BTreeIterator *bip, ExtendedVCB * vol)
 OSErr
 PositionIterator(CatalogIterator *cip, UInt32 offset, BTreeIterator *bip, UInt16 *op)
 {
-#define CAT_START_OFFSET (2 * sizeof(struct hfsdotentry))
+#define CAT_START_OFFSET 0
        ExtendedVCB *   vol;
        FCB *           fcb;
        OSErr           result = 0;