From owner-freebsd-bugs@FreeBSD.ORG Thu Oct 29 17:40:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 711251065670 for ; Thu, 29 Oct 2009 17:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 60FBA8FC29 for ; Thu, 29 Oct 2009 17:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n9THe2Dk030917 for ; Thu, 29 Oct 2009 17:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n9THe2sI030916; Thu, 29 Oct 2009 17:40:02 GMT (envelope-from gnats) Date: Thu, 29 Oct 2009 17:40:02 GMT Message-Id: <200910291740.n9THe2sI030916@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: John Baldwin Cc: Subject: Re: bin/135893: [patch] vmstat(8): 'vmstat -s -M core' is broken X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Baldwin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2009 17:40:03 -0000 The following reply was made to PR bin/135893; it has been noted by GNATS. From: John Baldwin 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