[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] strtosz() use unsigned char as isspace() is not
From: |
Jes . Sorensen |
Subject: |
[Qemu-devel] [PATCH 1/2] strtosz() use unsigned char as isspace() is not defined for signed char |
Date: |
Mon, 17 Jan 2011 15:56:45 +0100 |
From: Jes Sorensen <address@hidden>
Bug pointed out by Erik Blake, thanks!
Signed-off-by: Jes Sorensen <address@hidden>
---
cutils.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cutils.c b/cutils.c
index 7984bc1..f97ef39 100644
--- a/cutils.c
+++ b/cutils.c
@@ -294,7 +294,8 @@ int fcntl_setfl(int fd, int flag)
ssize_t strtosz_suffix(const char *nptr, char **end, const char default_suffix)
{
ssize_t retval = -1;
- char *endptr, c, d;
+ char *endptr;
+ unsigned char c, d;
int mul_required = 0;
double val, mul, integral, fraction;
--
1.7.3.4
- [Qemu-devel] [PATCH 1/2] strtosz() use unsigned char as isspace() is not defined for signed char,
Jes . Sorensen <=