Give correct results for SYSCTL_LONG arrays when sizeof(int) != sizeof(long)

This fixes unaligned access on alpha for, eg, sysctl kern.ipc.mbtypes.
This commit is contained in:
Andrew Gallatin 2000-10-23 21:04:18 +00:00
parent fc11653f20
commit 3c884b5097
1 changed files with 2 additions and 2 deletions

View File

@ -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);