[BACK]Return to dkstats.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / vmstat

Diff for /src/usr.bin/vmstat/dkstats.c between version 1.31 and 1.32

version 1.31, 2007/10/23 07:35:58 version 1.32, 2007/10/24 20:15:43
Line 256 
Line 256 
                                     dk_ndrive * sizeof(*last.dk_wbytes));                                      dk_ndrive * sizeof(*last.dk_wbytes));
                                 last.dk_time = realloc(last.dk_time,                                  last.dk_time = realloc(last.dk_time,
                                     dk_ndrive * sizeof(*last.dk_time));                                      dk_ndrive * sizeof(*last.dk_time));
   
                                   if (!cur.dk_select || !cur.dk_rxfer ||
                                       !cur.dk_wxfer || !cur.dk_seek ||
                                       !cur.dk_rbytes || !cur.dk_wbytes ||
                                       !cur.dk_time || !last.dk_rxfer ||
                                       !last.dk_wxfer || !last.dk_seek ||
                                       !last.dk_rbytes || !last.dk_wbytes ||
                                       !last.dk_time)
                                           errx(1, "Memory allocation failure.");
                         } else {                          } else {
                                 cur.dk_select = realloc(cur.dk_select,                                  cur.dk_select = realloc(cur.dk_select,
                                     dk_ndrive * sizeof(*cur.dk_select));                                      dk_ndrive * sizeof(*cur.dk_select));
Line 283 
Line 292 
                                     dk_ndrive * sizeof(*last.dk_wbytes));                                      dk_ndrive * sizeof(*last.dk_wbytes));
                                 last.dk_time = realloc(last.dk_time,                                  last.dk_time = realloc(last.dk_time,
                                     dk_ndrive * sizeof(*last.dk_time));                                      dk_ndrive * sizeof(*last.dk_time));
   
                                   if (!cur.dk_select || !cur.dk_rxfer ||
                                       !cur.dk_wxfer || !cur.dk_seek ||
                                       !cur.dk_rbytes || !cur.dk_wbytes ||
                                       !cur.dk_time || !last.dk_rxfer ||
                                       !last.dk_wxfer || !last.dk_seek ||
                                       !last.dk_rbytes || !last.dk_wbytes ||
                                       !last.dk_time)
                                           errx(1, "Memory allocation failure.");
   
                                 for (i = dk_ndrive - 1, j = cur.dk_ndrive - 1;                                  for (i = dk_ndrive - 1, j = cur.dk_ndrive - 1;
                                      i >= 0; i--) {                                       i >= 0; i--) {

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32