summaryrefslogtreecommitdiff
path: root/strings/dtoa.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-12-27 20:55:21 +0200
committerMichael Widenius <monty@askmonty.org>2011-12-27 20:55:21 +0200
commite6f5fc1c02bfbfde6322fb44d108e6de60b4f92f (patch)
tree7a525620be52c9cfcc27be5430371e5b711cf464 /strings/dtoa.c
parente72a6096f29a82081bffdd1b5f9fd4b322478457 (diff)
downloadmariadb-git-e6f5fc1c02bfbfde6322fb44d108e6de60b4f92f.tar.gz
Fixed lp:909051 Options --debug and --disable-debug are known but ambiguous in RelWithDebInfo build
Fixed memory leak printing when doing 'mysqld --version', 'mysqld --debug --help' and 'mysqld --debug --help --verbose' mysys/my_init.c: Moved checking if we should call DBUG_END() before my_thread_end() as otherwise we will not free DBUG variables and files. mysys/thr_lock.c: Fixed compiler warning sql/mysqld.cc: Fixed memory leaks when using mysqld --help and mysqld --version Added --debug as an option that works for all builds. For non debug builds we now get a warning. strings/dtoa.c: Fixed valgrind warning (c could contain data outside of the given string)
Diffstat (limited to 'strings/dtoa.c')
-rw-r--r--strings/dtoa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/strings/dtoa.c b/strings/dtoa.c
index e6339bab1d9..a6912859c7f 100644
--- a/strings/dtoa.c
+++ b/strings/dtoa.c
@@ -1398,12 +1398,12 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
nd0= nd;
if (s < end - 1 && c == '.')
{
- c= *++s;
+ ++s;
if (!nd)
{
- for (; s < end && c == '0'; c= *++s)
+ for (; s < end && (c= *s) == '0'; ++s)
nz++;
- if (s < end && c > '0' && c <= '9')
+ if (s < end && (c= *s) > '0' && c <= '9')
{
s0= s;
nf+= nz;
@@ -1412,7 +1412,7 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
}
goto dig_done;
}
- for (; s < end && c >= '0' && c <= '9'; c = *++s)
+ for (; s < end && (c= *s) >= '0' && c <= '9'; ++s)
{
have_dig:
nz++;