[Debtags-commits] [svn] r1838 - in tagcoll/2.0: . tagcoll/diskindex
Enrico Zini
enrico at costa.debian.org
Sun Aug 13 16:11:20 UTC 2006
Author: enrico
Date: Sun Aug 13 16:11:19 2006
New Revision: 1838
Modified:
tagcoll/2.0/ (props changed)
tagcoll/2.0/tagcoll/diskindex/mmap-tut.cc
Log:
r3120 at viaza: enrico | 2006-08-13 17:11:09 +0100
Silenced a valgrind warning in the tests, no changes to the library
Modified: tagcoll/2.0/tagcoll/diskindex/mmap-tut.cc
==============================================================================
--- tagcoll/2.0/tagcoll/diskindex/mmap-tut.cc (original)
+++ tagcoll/2.0/tagcoll/diskindex/mmap-tut.cc Sun Aug 13 16:11:19 2006
@@ -52,7 +52,14 @@
/// Write the index data in the given buffer, which should be at least
/// encodedSize bytes
- virtual void encode(char* buf) const { memcpy(buf, data.c_str(), data.size() + 1); }
+ virtual void encode(char* buf) const
+ {
+ memcpy(buf, data.c_str(), data.size() + 1);
+ int tail = data.size() + 1;
+ int total = encodedSize();
+ for ( ; tail < total; ++tail)
+ buf[tail] = 0;
+ }
};
static const char* fname = "tagcoll_mmapindex.tmp";
More information about the Debtags-commits
mailing list