From: VMware, Inc <> Date: Mon, 26 Jul 2010 19:01:27 +0000 (-0700) Subject: lib/misc: a nicer fix for codeset X-Git-Tag: 2010.07.25-280253~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d7d499784586267bfef9ef0042c9866347e309d2;p=thirdparty%2Fopen-vm-tools.git lib/misc: a nicer fix for codeset The uint8 ensures no signs get in the way. We're fine with them but this way is even clearer. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/misc/codeset.c b/open-vm-tools/lib/misc/codeset.c index 3699bd430..e3821887b 100644 --- a/open-vm-tools/lib/misc/codeset.c +++ b/open-vm-tools/lib/misc/codeset.c @@ -1778,8 +1778,8 @@ CodeSet_UTF32ToUTF8(const char *utf32, // IN: char **utf8) // OUT: { uint32 i; - char *p; - char *q; + uint8 *p; + uint8 *q; uint32 len; union { uint32 word; @@ -1800,7 +1800,7 @@ CodeSet_UTF32ToUTF8(const char *utf32, // IN: */ len = 0; - p = (char *) utf32; + p = (uint8 *) utf32; while (TRUE) { value.bytes[0] = *p++; @@ -1830,8 +1830,8 @@ CodeSet_UTF32ToUTF8(const char *utf32, // IN: * UTF8 equivalent. */ - p = (char *) utf32; - q = *utf8; + p = (uint8 *) utf32; + q = (uint8 *) *utf8; for (i = 0; i < len; i++) { value.bytes[0] = *p++;