Mike McCormack : server: Avoid comparison of -1 with an unsigned
variable.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Apr 7 05:04:40 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 14278b42994e58bbe0266ffff28bed92ced2f7ae
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=14278b42994e58bbe0266ffff28bed92ced2f7ae
Author: Mike McCormack <mike at codeweavers.com>
Date: Fri Apr 7 15:06:15 2006 +0900
server: Avoid comparison of -1 with an unsigned variable.
---
server/registry.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/registry.c b/server/registry.c
index 63b3c12..f2a5ce5 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -1233,9 +1233,10 @@ static struct key_value *parse_value_nam
}
else
{
- if ((*len = parse_strW( info->tmp, &maxlen, buffer + 1, '\"' )) == -1) goto error;
+ int r = parse_strW( info->tmp, &maxlen, buffer + 1, '\"' );
+ if (r == -1) goto error;
+ *len = r + 1; /* for initial quote */
name.len = maxlen - sizeof(WCHAR);
- (*len)++; /* for initial quote */
}
while (isspace(buffer[*len])) (*len)++;
if (buffer[*len] != '=') goto error;
More information about the wine-cvs
mailing list