[Pcre-svn] [1138] code/trunk/pcre32_utf32_utils.c: Fix some …

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1138] code/trunk/pcre32_utf32_utils.c: Fix some sign-conversion warnings
Revision: 1138
          http://vcs.pcre.org/viewvc?view=rev&revision=1138
Author:   chpe
Date:     2012-10-18 20:08:14 +0100 (Thu, 18 Oct 2012)


Log Message:
-----------
Fix some sign-conversion warnings

Modified Paths:
--------------
    code/trunk/pcre32_utf32_utils.c


Modified: code/trunk/pcre32_utf32_utils.c
===================================================================
--- code/trunk/pcre32_utf32_utils.c    2012-10-18 19:08:11 UTC (rev 1137)
+++ code/trunk/pcre32_utf32_utils.c    2012-10-18 19:08:14 UTC (rev 1138)
@@ -105,8 +105,9 @@
 register pcre_uchar c;


if (length < 0)
- length = STRLEN_UC(iptr) + 1;
-end = iptr + length;
+ end = iptr + STRLEN_UC(iptr) + 1;
+else
+ end = iptr + length;

 while (iptr < end)
   {
@@ -118,8 +119,6 @@
     host_bo = c == 0x0000feffu;
     if (keep_boms != 0)
       *optr++ = 0x0000feffu;
-    else
-      length--;
     }
   else
     *optr++ = host_bo ? c : swap_uint32(c);