1
0
Fork 0

added assertion

This commit is contained in:
Jan Steemann 2013-06-19 16:51:35 +02:00
parent 9dfb7483ff
commit 314a0f926a
1 changed files with 2 additions and 1 deletions

View File

@ -523,7 +523,7 @@ static bool CheckDatafile (TRI_datafile_t* datafile) {
#ifdef DEBUG_DATAFILE
LOG_TRACE("MARKER: size %lu, tick %lx, crc %lx, type %u",
(unsigned long) marker->_size,
(unsigned long) marker->_tick,
(unsigned long long) marker->_tick,
(unsigned long) marker->_crc,
(unsigned int) marker->_type);
#endif
@ -1186,6 +1186,7 @@ int TRI_WriteElementDatafile (TRI_datafile_t* datafile,
TRI_df_marker_t const* marker,
TRI_voc_size_t markerSize,
bool forceSync) {
assert(markerSize > 0);
if (markerSize != marker->_size) {
LOG_ERROR("marker size is %lu, but size is %lu",