diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2008-12-23 14:50:28 +0000 |
---|---|---|
committer | Jaap Keuter <jaap.keuter@xs4all.nl> | 2008-12-23 14:50:28 +0000 |
commit | 11b17818a1e843b7aa49b269ef4bcc20d13df217 (patch) | |
tree | 28a5a03c45f299769342128065340ad281c3751b /epan/follow.c | |
parent | 3a50c0063f9baf439841d0fd51279eee6eca50e8 (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.
svn path=/trunk/; revision=27093
Diffstat (limited to 'epan/follow.c')
-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; } |