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

Diff for /src/usr.bin/top/machine.c between version 1.88 and 1.89

version 1.88, 2017/03/15 04:24:14 version 1.89, 2017/05/30 06:01:30
Line 159 
Line 159 
 getncpu(void)  getncpu(void)
 {  {
         int mib[] = { CTL_HW, HW_NCPU };          int mib[] = { CTL_HW, HW_NCPU };
         int ncpu;          int numcpu;
         size_t size = sizeof(ncpu);          size_t size = sizeof(numcpu);
   
         if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),          if (sysctl(mib, sizeof(mib) / sizeof(mib[0]),
             &ncpu, &size, NULL, 0) == -1)              &numcpu, &size, NULL, 0) == -1)
                 return (-1);                  return (-1);
   
         return (ncpu);          return (numcpu);
 }  }
   
 int  int
Line 545 
Line 545 
 }  }
   
 char *  char *
 format_next_process(caddr_t handle, char *(*get_userid)(uid_t), pid_t *pid,  format_next_process(caddr_t hndl, char *(*get_userid)(uid_t), pid_t *pid,
     int show_threads)      int show_threads)
 {  {
         char *p_wait;          char *p_wait;
Line 556 
Line 556 
         char buf[16];          char buf[16];
   
         /* find and remember the next proc structure */          /* find and remember the next proc structure */
         hp = (struct handle *) handle;          hp = (struct handle *) hndl;
         pp = *(hp->next_proc++);          pp = *(hp->next_proc++);
         hp->remaining--;          hp->remaining--;
   

Legend:
Removed from v.1.88  
changed lines
  Added in v.1.89