- Replace the bandaid introduced in revision 1.110 with

a better solution.
 - Add braces for a ``for'' statement containing a single
   multi-line statement.
This commit is contained in:
robert 2002-05-31 09:41:09 +00:00
parent ca02bcf7fc
commit c2b2e9b3bc

View File

@ -524,7 +524,8 @@ sysctl_kern_malloc(SYSCTL_HANDLER_ARGS)
p += len;
first = 1;
for (i = 0; i < 32 /* 8 * sizeof(type->ks_size) */; i++)
for (i = 0; i < sizeof(kmemzones) / sizeof(kmemzones[0]) - 1;
i++) {
if (type->ks_size & (1 << i)) {
if (first)
len = snprintf(p, curline, " ");
@ -540,6 +541,7 @@ sysctl_kern_malloc(SYSCTL_HANDLER_ARGS)
first = 0;
}
}
len = snprintf(p, 2, "\n");
p += len;