1
0
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:
Dag-Erling Smørgrav
2026-04-11 21:23:08 +02:00
parent 850eb149e7
commit 9d95d80669
+2 -2
View File
@@ -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;