From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH 14/22] libelf: use C99 bool for booleans Date: Tue, 11 Jun 2013 08:17:58 +0100 Message-ID: <51B6EB4602000078000DCFA1@nat28.tlf.novell.com> References: <1370629642-6990-1-git-send-email-ian.jackson@eu.citrix.com> <1370629642-6990-15-git-send-email-ian.jackson@eu.citrix.com> <51B64E84.2030606@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51B64E84.2030606@citrix.com> Content-Disposition: inline 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 , Ian Jackson Cc: "mattjd@gmail.com" , "xen-devel@lists.xensource.com" , "security@xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 11.06.13 at 00:09, Andrew Cooper wrote: > On 07/06/13 19:27, Ian Jackson wrote: >> @@ -46,7 +46,7 @@ static void log_callback(struct elf_binary *elf, void *caller_data, >> >> void xc_elf_set_logfile(xc_interface *xch, struct elf_binary *elf, >> int verbose) { >> - elf_set_log(elf, log_callback, xch, verbose); >> + elf_set_log(elf, log_callback, xch, verbose /* convert to bool */); > > Change the function prototype from int verbose to bool verbose ? > > If not, for API reasons, then use !!verbose to correctly convert an > integer to a boolean. A compiler implementing _Bool ought to be doing the conversion without need to use !! in the source. Jan