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

Diff for /src/usr.bin/top/utils.c between version 1.18 and 1.19

version 1.18, 2007/04/04 19:22:46 version 1.19, 2007/07/16 15:14:33
Line 38 
Line 38 
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
 #include <stdlib.h>  #include <stdlib.h>
   #include <stdint.h>
   
 #include "top.h"  #include "top.h"
 #include "machine.h"  #include "machine.h"
Line 226 
Line 227 
         for (i = 0; i < cnt; i++) {          for (i = 0; i < cnt; i++) {
                 if ((change = *new - *old) < 0) {                  if ((change = *new - *old) < 0) {
                         /* this only happens when the counter wraps */                          /* this only happens when the counter wraps */
                         change = (*new - *old);                          change = INT64_MAX - *old + *new;
                 }                  }
                 total_change += (*dp++ = change);                  total_change += (*dp++ = change);
                 *old++ = *new++;                  *old++ = *new++;

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19