From: Ian Campbell Subject: Re: [PATCH] tools/libxc: Fix error checking for xc_get_{cpu, node}map_size() callers Date: Thu, 12 Dec 2013 14:24:02 +0000 Message-ID: <1386858242.18946.1.camel@kazak.uk.xensource.com> References: <1386776862-19921-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1386776862-19921-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: George Dunlap , Dario Faggioli , Ian Jackson , Xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, 2013-12-11 at 15:47 +0000, Andrew Cooper wrote: > c/s 2e82c18cd850592ae9a1f682eb93965a868b5f2f changed the error returns of > xc_get_{cpu,node}map_size() to now include returning -1. This invalidated the > error checks from callers, which expected 0 to be the only error case. I don't think 0 is a valid error value any more. Neither xc_get_max_cpus nor xc_get_max_nodes can return 0 and the map_size functions will round to 1 or more. So these could all be "< 0" tests think.