Page MenuHomeFreeBSD

D9937.diff
No OneTemporary

D9937.diff

Index: head/usr.bin/vmstat/vmstat.c
===================================================================
--- head/usr.bin/vmstat/vmstat.c
+++ head/usr.bin/vmstat/vmstat.c
@@ -288,17 +288,13 @@
namelist[X_SUM].n_name = "_cnt";
goto retry_nlist;
}
- for (c = 0;
- c < (int)(sizeof(namelist)/sizeof(namelist[0]));
- c++)
+ for (c = 0; c < nitems(namelist); c++)
if (namelist[c].n_type == 0)
bufsize += strlen(namelist[c].n_name) + 1;
bufsize += len + 1;
buf = bp = alloca(bufsize);
- for (c = 0;
- c < (int)(sizeof(namelist)/sizeof(namelist[0]));
- c++)
+ for (c = 0; c < nitems(namelist); c++)
if (namelist[c].n_type == 0) {
xo_error(" %s",
namelist[c].n_name);

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 6, 6:12 AM (12 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29315539
Default Alt Text
D9937.diff (751 B)

Event Timeline