diff options
author | John Esmet <john.esmet@gmail.com> | 2014-06-14 21:04:01 -0400 |
---|---|---|
committer | John Esmet <john.esmet@gmail.com> | 2014-06-14 21:04:43 -0400 |
commit | 86c751f8288e4bc14bf50065e42aec29508505f2 (patch) | |
tree | e8dd903b139f3a175fdc89db0b5bd0d973357df7 /util | |
parent | 92e19eac0d5f37427f2e540fe38053260581ec26 (diff) | |
download | mariadb-git-86c751f8288e4bc14bf50065e42aec29508505f2.tar.gz |
FT-259 Placate the build slaves with their exotic toolchain.
Diffstat (limited to 'util')
-rw-r--r-- | util/tests/memarena-test.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util/tests/memarena-test.cc b/util/tests/memarena-test.cc index b687a9a4287..46a55d58847 100644 --- a/util/tests/memarena-test.cc +++ b/util/tests/memarena-test.cc @@ -118,7 +118,9 @@ private: // make sure memory was allocated ok by // writing to buf and reading it back - memset(ma._current_chunk.buf, magic, size); + if (size > 0) { + memset(ma._current_chunk.buf, magic, size); + } for (size_t i = 0; i < size; i++) { const char *buf = reinterpret_cast<char *>(ma._current_chunk.buf); invariant(buf[i] == magic); @@ -134,7 +136,9 @@ private: // make sure memory was allocated ok by // writing to buf and reading it back - memset(ma._current_chunk.buf, magic, size); + if (size > 0) { + memset(ma._current_chunk.buf, magic, size); + } for (size_t i = 0; i < size; i++) { const char *c = reinterpret_cast<char *>(ma._current_chunk.buf); invariant(c[i] == magic); |