s4:registry - "patchfile_preg.c" - assign a better type to the "i" counter variable
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 8 Apr 2010 21:43:50 +0000 (23:43 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 8 Apr 2010 21:57:35 +0000 (23:57 +0200)
The "i" variable sums up "size" values which are of type "size_t". Therefore
also "i" itself should be from this type.

source4/lib/registry/patchfile_preg.c

index 8854225c76dd548d3d1674ac7a1bc7440b122d3a..eb84b564035d2fa01b69b1156c72d84179d9c8bc 100644 (file)
@@ -42,8 +42,7 @@ static WERROR preg_read_utf16(int fd, char *c)
 static WERROR preg_write_utf16(int fd, const char *string)
 {
        codepoint_t v;
-       uint16_t i;
-       size_t size;
+       size_t i, size;
 
        for (i = 0; i < strlen(string); i+=size) {
                v = next_codepoint(&string[i], &size);