put fwrite and fread into DISSECTOR_ASSERT in order to use the result

svn path=/trunk/; revision=21865
This commit is contained in:
Jörg Mayer 2007-05-21 19:43:17 +00:00
parent 33cd736ce7
commit 4a22b30c36
1 changed files with 2 additions and 2 deletions

View File

@ -329,7 +329,7 @@ reset_tcp_reassembly() {
static void
write_packet_data( int index, tcp_stream_chunk *sc, const char *data )
{
fwrite( sc, 1, sizeof(tcp_stream_chunk), data_out_file );
fwrite( data, 1, sc->dlen, data_out_file );
DISSECTOR_ASSERT(1 * sizeof(tcp_stream_chunk) == fwrite( sc, 1, sizeof(tcp_stream_chunk), data_out_file ));
DISSECTOR_ASSERT(1 * sc->dlen == fwrite( data, 1, sc->dlen, data_out_file ));
bytes_written[index] += sc->dlen;
}