diff options
author | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-12-23 14:50:28 +0000 |
---|---|---|
committer | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-12-23 14:50:28 +0000 |
commit | 6cfe184bbb7e047ad5253c0576232ecb117075e6 (patch) | |
tree | 28a5a03c45f299769342128065340ad281c3751b | |
parent | c6504b7390357d58495635badec81ece6b6eed6f (diff) |
From Didier Gautheron:
In follow.c there's stuff like: DISSECTOR_ASSERT(... fwrite( data, 1, sc->dlen, data_out_file )
If DISSECTOR_ASSERT is defined as a noop then fwrite is not called.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27093 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | epan/follow.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/follow.c b/epan/follow.c index 749d039600..953e07fe56 100644 --- a/epan/follow.c +++ b/epan/follow.c @@ -424,8 +424,14 @@ reset_tcp_reassembly(void) static void write_packet_data( int index, tcp_stream_chunk *sc, const char *data ) { - 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 )); + size_t ret; + + ret = fwrite( sc, 1, sizeof(tcp_stream_chunk), data_out_file ); + DISSECTOR_ASSERT(sizeof(tcp_stream_chunk) == ret); + + ret = fwrite( data, 1, sc->dlen, data_out_file ); + DISSECTOR_ASSERT(sc->dlen == ret); + bytes_written[index] += sc->dlen; empty_tcp_stream = FALSE; } |