From 3c884b5097273b54251b503b00995f73cd184fae Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Mon, 23 Oct 2000 21:04:18 +0000 Subject: [PATCH] Give correct results for SYSCTL_LONG arrays when sizeof(int) != sizeof(long) This fixes unaligned access on alpha for, eg, sysctl kern.ipc.mbtypes. --- sbin/sysctl/sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index ee7ee729ca91..959689a80307 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -422,8 +422,8 @@ show_var(int *oid, int nlen) else printf("%s%ld", val, *(long *)p); val = " "; - len -= sizeof (int); - p += sizeof (int); + len -= sizeof (long); + p += sizeof (long); } return (0);