diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-12-16 15:34:11 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-12-16 15:34:11 +0100 |
commit | 2ff2d1873a989e1c7f304f64c57ff236d7c48750 (patch) | |
tree | 6ef380be281adedf087a0aeebda5286409211a25 /extra | |
parent | f31b16543a7b0f1c07ecb54113df5b70ceef6550 (diff) | |
parent | b3d99069077cd24e1cf4bb07857fdb12aee895a0 (diff) | |
download | mariadb-git-2ff2d1873a989e1c7f304f64c57ff236d7c48750.tar.gz |
merge
Diffstat (limited to 'extra')
-rw-r--r-- | extra/.cvsignore | 10 | ||||
-rw-r--r-- | extra/comp_err.c | 12 |
2 files changed, 7 insertions, 15 deletions
diff --git a/extra/.cvsignore b/extra/.cvsignore deleted file mode 100644 index e0042c405cc..00000000000 --- a/extra/.cvsignore +++ /dev/null @@ -1,10 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -comp_err -my_print_defaults -perror -print_defaults -replace -resolveip diff --git a/extra/comp_err.c b/extra/comp_err.c index 4bcd4c74a1d..0b894dae477 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -660,7 +660,7 @@ static ha_checksum checksum_format_specifier(const char* msg) case 'u': case 'x': case 's': - chksum= my_checksum(chksum, start, (uint) (p - start)); + chksum= my_checksum(chksum, start, (uint) (p + 1 - start)); start= 0; /* Not in format specifier anymore */ break; @@ -1030,8 +1030,10 @@ static char *parse_text_line(char *pos) { int i, nr; char *row= pos; + size_t len; DBUG_ENTER("parse_text_line"); + len= strlen (pos); while (*pos) { if (*pos == '\\') @@ -1039,11 +1041,11 @@ static char *parse_text_line(char *pos) switch (*++pos) { case '\\': case '"': - (void) strmov(pos - 1, pos); + (void) memmove (pos - 1, pos, len - (row - pos)); break; case 'n': pos[-1]= '\n'; - (void) strmov(pos, pos + 1); + (void) memmove (pos, pos + 1, len - (row - pos)); break; default: if (*pos >= '0' && *pos < '8') @@ -1053,10 +1055,10 @@ static char *parse_text_line(char *pos) nr= nr * 8 + (*(pos++) - '0'); pos -= i; pos[-1]= nr; - (void) strmov(pos, pos + i); + (void) memmove (pos, pos + i, len - (row - pos)); } else if (*pos) - (void) strmov(pos - 1, pos); /* Remove '\' */ + (void) memmove (pos - 1, pos, len - (row - pos)); /* Remove '\' */ } } else |