diff options
author | gallatin <gallatin@FreeBSD.org> | 2000-10-23 21:04:18 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2000-10-23 21:04:18 +0000 |
commit | 11e8e4bacdbafaa03686b68ae7bf9d2ccf073916 (patch) | |
tree | cc639c032c457b2e32c5d041045792568504c711 /sbin | |
parent | 8a98d4ea0bd90b52d46709c14fd903fede17015b (diff) | |
download | FreeBSD-src-11e8e4bacdbafaa03686b68ae7bf9d2ccf073916.zip FreeBSD-src-11e8e4bacdbafaa03686b68ae7bf9d2ccf073916.tar.gz |
Give correct results for SYSCTL_LONG arrays when sizeof(int) != sizeof(long)
This fixes unaligned access on alpha for, eg, sysctl kern.ipc.mbtypes.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/sysctl/sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index ee7ee72..959689a 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); |