From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45426 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhP0t-0008Q9-IY for qemu-devel@nongnu.org; Mon, 24 Jan 2011 11:11:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhP0n-0003AA-3Y for qemu-devel@nongnu.org; Mon, 24 Jan 2011 11:11:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhP0m-0003A4-Qc for qemu-devel@nongnu.org; Mon, 24 Jan 2011 11:11:25 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0OGBOep022384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 Jan 2011 11:11:24 -0500 Message-ID: <4D3DA4AA.4030503@redhat.com> Date: Mon, 24 Jan 2011 17:11:22 +0100 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/4] strtosz(): use unsigned char and switch to qemu_isspace() References: <1295883211-18288-1-git-send-email-Jes.Sorensen@redhat.com> <1295883211-18288-2-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, qemu-devel@nongnu.org On 01/24/11 17:10, Markus Armbruster wrote: > Jes.Sorensen@redhat.com writes: > >> From: Jes Sorensen >> >> isspace() behavior is undefined for signed char. >> >> Bug pointed out by Eric Blake, thanks! >> >> Signed-off-by: Jes Sorensen >> --- >> cutils.c | 7 ++++--- >> 1 files changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/cutils.c b/cutils.c >> index 4d2e27c..a067cf4 100644 >> --- a/cutils.c >> +++ b/cutils.c >> @@ -294,7 +294,8 @@ int fcntl_setfl(int fd, int flag) >> int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix) >> { >> int64_t retval = -1; >> - char *endptr, c, d; >> + char *endptr; >> + unsigned char c, d; >> int mul_required = 0; >> double val, mul, integral, fraction; >> > > I doubt this hunk is still needed. It isn't strictly due to qemu_toupper() but it is prettier to match the real behavior of pure toupper() anyway. Jes