qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] strtosz() cleanup
@ 2011-01-17 15:14 Jes.Sorensen
  2011-01-17 15:14 ` [Qemu-devel] [PATCH 1/2] strtosz() use unsigned char as isspace() is not defined for signed char Jes.Sorensen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jes.Sorensen @ 2011-01-17 15:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Alex.Williamson, eblake

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Fix issue with signed char and isspace() as well as clean up switch
statement using toupper().

V2 of the patch fixes some types in the commit messages and spells
Eric correctly. My apologies for getting it wrong.

Jes Sorensen (2):
  strtosz() use unsigned char as isspace() is not defined for signed
    char
  strtosz() use toupper() to simplify switch statement

 cutils.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

-- 
1.7.3.4

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 1/2] strtosz() use unsigned char as isspace() is not defined for signed char
@ 2011-01-17 14:56 Jes.Sorensen
  0 siblings, 0 replies; 8+ messages in thread
From: Jes.Sorensen @ 2011-01-17 14:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Alex.Williamson, eblake

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Bug pointed out by Erik Blake, thanks!

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-17 20:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-17 15:14 [Qemu-devel] [PATCH v2 0/2] strtosz() cleanup Jes.Sorensen
2011-01-17 15:14 ` [Qemu-devel] [PATCH 1/2] strtosz() use unsigned char as isspace() is not defined for signed char Jes.Sorensen
2011-01-17 19:59   ` Blue Swirl
2011-01-17 15:14 ` [Qemu-devel] [PATCH 2/2] strtosz() use toupper() to simplify switch statement Jes.Sorensen
2011-01-17 19:57   ` Blue Swirl
2011-01-17 15:24 ` [Qemu-devel] Re: [PATCH v2 0/2] strtosz() cleanup Alex Williamson
2011-01-17 17:07   ` Alex Williamson
  -- strict thread matches above, loose matches on Subject: below --
2011-01-17 14:56 [Qemu-devel] [PATCH 1/2] strtosz() use unsigned char as isspace() is not defined for signed char Jes.Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).