diff options
Diffstat (limited to 'usr.bin/procstat/procstat.c')
-rw-r--r-- | usr.bin/procstat/procstat.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/procstat/procstat.c b/usr.bin/procstat/procstat.c index d039831..48f7051 100644 --- a/usr.bin/procstat/procstat.c +++ b/usr.bin/procstat/procstat.c @@ -81,12 +81,12 @@ kinfo_proc_compare(const void *a, const void *b) { int i; - i = ((struct kinfo_proc *)a)->ki_pid - - ((struct kinfo_proc *)b)->ki_pid; + i = ((const struct kinfo_proc *)a)->ki_pid - + ((const struct kinfo_proc *)b)->ki_pid; if (i != 0) return (i); - i = ((struct kinfo_proc *)a)->ki_tid - - ((struct kinfo_proc *)b)->ki_tid; + i = ((const struct kinfo_proc *)a)->ki_tid - + ((const struct kinfo_proc *)b)->ki_tid; return (i); } @@ -100,7 +100,8 @@ kinfo_proc_sort(struct kinfo_proc *kipp, int count) int main(int argc, char *argv[]) { - int ch, i, interval, name[4], tmp; + int ch, interval, name[4], tmp; + unsigned int i; struct kinfo_proc *kipp; size_t len; long l; @@ -208,7 +209,7 @@ main(int argc, char *argv[]) } free(kipp); } - for (i = 0; i < argc; i++) { + for (i = 0; i < (unsigned int)argc; i++) { l = strtol(argv[i], &dummy, 10); if (*dummy != '\0') usage(); |