=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/machine.c,v retrieving revision 1.88 retrieving revision 1.89 diff -c -r1.88 -r1.89 *** src/usr.bin/top/machine.c 2017/03/15 04:24:14 1.88 --- src/usr.bin/top/machine.c 2017/05/30 06:01:30 1.89 *************** *** 1,4 **** ! /* $OpenBSD: machine.c,v 1.88 2017/03/15 04:24:14 deraadt Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert --- 1,4 ---- ! /* $OpenBSD: machine.c,v 1.89 2017/05/30 06:01:30 tedu Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert *************** *** 159,172 **** getncpu(void) { int mib[] = { CTL_HW, HW_NCPU }; ! int ncpu; ! size_t size = sizeof(ncpu); if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), ! &ncpu, &size, NULL, 0) == -1) return (-1); ! return (ncpu); } int --- 159,172 ---- getncpu(void) { int mib[] = { CTL_HW, HW_NCPU }; ! int numcpu; ! size_t size = sizeof(numcpu); if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), ! &numcpu, &size, NULL, 0) == -1) return (-1); ! return (numcpu); } int *************** *** 545,551 **** } char * ! format_next_process(caddr_t handle, char *(*get_userid)(uid_t), pid_t *pid, int show_threads) { char *p_wait; --- 545,551 ---- } char * ! format_next_process(caddr_t hndl, char *(*get_userid)(uid_t), pid_t *pid, int show_threads) { char *p_wait; *************** *** 556,562 **** char buf[16]; /* find and remember the next proc structure */ ! hp = (struct handle *) handle; pp = *(hp->next_proc++); hp->remaining--; --- 556,562 ---- char buf[16]; /* find and remember the next proc structure */ ! hp = (struct handle *) hndl; pp = *(hp->next_proc++); hp->remaining--;