Date: Thu, 29 Oct 2009 17:40:02 GMT From: John Baldwin <jhb@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/135893: [patch] vmstat(8): 'vmstat -s -M core' is broken Message-ID: <200910291740.n9THe2sI030916@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR bin/135893; it has been noted by GNATS.
From: John Baldwin <jhb@FreeBSD.org>
To: bug-followup@freebsd.org,
to.my.trociny@gmail.com
Cc:
Subject: Re: bin/135893: [patch] vmstat(8): 'vmstat -s -M core' is broken
Date: Thu, 29 Oct 2009 13:20:46 -0400
This looks good in general. Some suggestions:
In fill_pcpu():
- Use 'kvm_getmaxcpu' instead of 'kvm_getcptime' in error message.
- I think it's ok to just drop the maxcpu == 0 check.
- I would just use 'calloc(maxcpu, sizeof(struct pcpu *))' and
have the error just say that calloc() failed w/o including the
size.
- C doesn't require a cast for void * pointers, so you can remove
the cast from calloc().
- Always use a space after 'if' and let the first { of a function
start on a new line.
- I would probably use 'pcpu' instead of 'ppcpup' as the variable
name.
These are fairly minor nits though. I can probably fix these things and test
it today.
--
John Baldwin
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910291740.n9THe2sI030916>
