d = bp->b_addr;
bf = M_DIROPS(mp)->data_bestfree_p(d);
- ptr = (char *)M_DIROPS(mp)->data_entry_p(d);
+ ptr = (char *)d + M_DIROPS(mp)->data_entry_offset;
badbest = lastfree = freeseen = 0;
if (be16_to_cpu(bf[0].length) == 0) {
badbest |= be16_to_cpu(bf[0].offset) != 0;
do_warn(_("\twould junk block\n"));
return 1;
}
- ptr = (char *)M_DIROPS(mp)->data_entry_p(d);
+ ptr = (char *)d + M_DIROPS(mp)->data_entry_offset;
/*
* Process the entries now.
*/
bp = *bpp;
d = bp->b_addr;
- ptr = (char *)M_DIROPS(mp)->data_entry_p(d);
+ ptr = (char *)d + M_DIROPS(mp)->data_entry_offset;
nbad = 0;
needscan = needlog = 0;
junkit = 0;
break;
/* check for block with no data entries */
- if ((ptr == (char *)M_DIROPS(mp)->data_entry_p(d)) &&
+ if ((ptr == (char *)d + M_DIROPS(mp)->data_entry_offset) &&
(ptr + be16_to_cpu(dup->length) >= endptr)) {
junkit = 1;
*num_illegal += 1;
do_warn(_("would fix magic # to %#x\n"), wantmagic);
}
lastfree = 0;
- ptr = (char *)M_DIROPS(mp)->data_entry_p(d);
+ ptr = (char *)d + M_DIROPS(mp)->data_entry_offset;
/*
* look at each entry. reference inode pointed to by each
* entry in the incore inode tree.
(dep->name[0] == '.' && dep->namelen == 1));
add_inode_ref(current_irec, current_ino_offset);
if (da_bno != 0 ||
- dep != M_DIROPS(mp)->data_entry_p(d)) {
+ dep != (void *)d + M_DIROPS(mp)->data_entry_offset) {
/* "." should be the first entry */
nbad++;
if (entry_junked(