mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
tunefs: Fix pointer arithmetic
While here, remove a bogus const which has been there for years. MFC after: 1 week Reported by: ivy@ Fixes:1b83e8a3f8("Constify string pointers.") Fixes:8244dd3262("tunefs: Better fix for arm64 alignment issues") Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56343
This commit is contained in:
@@ -708,13 +708,13 @@ journal_findfile(void)
|
||||
}
|
||||
|
||||
static void
|
||||
dir_clear_block(const dirblock *block, off_t off)
|
||||
dir_clear_block(dirblock *block, off_t off)
|
||||
{
|
||||
struct direct *dp;
|
||||
|
||||
for (; off < sblock.fs_bsize; off += DIRBLKSIZ) {
|
||||
assert(off % alignof(struct direct) == 0);
|
||||
dp = (struct direct *)(uintptr_t)(block + off);
|
||||
dp = (struct direct *)(uintptr_t)(block->buf + off);
|
||||
dp->d_ino = 0;
|
||||
dp->d_reclen = DIRBLKSIZ;
|
||||
dp->d_type = DT_UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user