diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-04-11 19:23:08 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-04-11 19:23:08 +0000 |
| commit | 9d95d806691e4ef1411c6c3b892d8b774754d724 (patch) | |
| tree | 813db561d0677614113266bd15fac6a325755173 | |
| parent | 850eb149e7ab0733fcf9469a607dca223ff467ad (diff) | |
tunefs: Fix pointer arithmetic
While here, remove a bogus const which has been there for years.
MFC after: 1 week
Reported by: ivy@
Fixes: 1b83e8a3f840 ("Constify string pointers.")
Fixes: 8244dd326265 ("tunefs: Better fix for arm64 alignment issues")
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D56343
| -rw-r--r-- | sbin/tunefs/tunefs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 56160dafce28..f3e9306f8ca1 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -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; |
