From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSs3d-0000NE-Tf for qemu-devel@nongnu.org; Mon, 20 Jul 2009 08:33:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSs3Z-0000JA-30 for qemu-devel@nongnu.org; Mon, 20 Jul 2009 08:33:29 -0400 Received: from [199.232.76.173] (port=47409 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSs3Y-0000Iv-Qg for qemu-devel@nongnu.org; Mon, 20 Jul 2009 08:33:24 -0400 Received: from verein.lst.de ([213.95.11.210]:33034) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MSs3Y-0001nd-7X for qemu-devel@nongnu.org; Mon, 20 Jul 2009 08:33:24 -0400 Date: Mon, 20 Jul 2009 14:33:22 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH] qemu-io: reject invalid pattern Message-ID: <20090720123322.GB9199@lst.de> References: <20090719231925.GA1923@lst.de> <4A64254E.8030000@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A64254E.8030000@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Mon, Jul 20, 2009 at 10:05:34AM +0200, Kevin Wolf wrote: > > + * Because the pattern is used as an argument to memset it must evaluate > > + * to an unsigned integer that fits into a single byte. > > + * Returns the pattern byte or -1 in case arg does not contain a valid > pattern > > > + pattern = parse_pattern(optarg); > > + if (pattern < 0) > > + return 0; > > Coding style (braces). > > Looks good to me otherwise. Thanks, I've resent an updated version.