diff options
author | monty@mysql.com <> | 2005-02-28 11:59:46 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2005-02-28 11:59:46 +0200 |
commit | 253bfcf7836fd785818128fb18a148f85673f169 (patch) | |
tree | 93113f7a95c643d072853092d2abc4344982b8e9 /strings | |
parent | 88e1ebd01a77f77b6d6468eaa2d0758bd5dcefad (diff) | |
download | mariadb-git-253bfcf7836fd785818128fb18a148f85673f169.tar.gz |
Fixed wrong memory references found by purify
(No really critical errors found, but a few possible wrong results)
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-simple.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index c2a6aa4e17f..080e0b780b7 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -518,7 +518,6 @@ longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)), register unsigned int cutlim; register ulonglong i; register const char *s, *e; - register unsigned char c; const char *save; int overflow; @@ -581,8 +580,9 @@ longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)), overflow = 0; i = 0; - for (c = *s; s != e; c = *++s) + for ( ; s != e; s++) { + register unsigned char c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') @@ -641,7 +641,6 @@ ulonglong my_strntoull_8bit(CHARSET_INFO *cs, register unsigned int cutlim; register ulonglong i; register const char *s, *e; - register unsigned char c; const char *save; int overflow; @@ -704,8 +703,10 @@ ulonglong my_strntoull_8bit(CHARSET_INFO *cs, overflow = 0; i = 0; - for (c = *s; s != e; c = *++s) + for ( ; s != e; s++) { + register unsigned char c= *s; + if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') |