summaryrefslogtreecommitdiff
path: root/text2pcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-09-29 20:26:25 +0000
committerGuy Harris <guy@alum.mit.edu>2013-09-29 20:26:25 +0000
commitc42263f28aa2446b5c205a716f6218b0d8896123 (patch)
tree57eaeca8b0df376e376993b4ed28abf2d49de21a /text2pcap.c
parent9b2ecdc9a712ee9df4c52b53a5f132c05e2e5182 (diff)
downloadwireshark-c42263f28aa2446b5c205a716f6218b0d8896123.tar.gz
We always write to a FILE *, so:
make libpcap_write_to_file() static; don't pass it as an argument to write routines, just have them call it directly; make the handle argument a FILE *. Make the data length argument to libpcap_write_to_file() a size_t, as that's what, for example, fwrite() takes as a size argument. svn path=/trunk/; revision=52274
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/text2pcap.c b/text2pcap.c
index 7c109929d2..e90e8ead04 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -842,7 +842,7 @@ write_current_packet(gboolean cont)
length = 60;
}
if (use_pcapng) {
- success = libpcap_write_enhanced_packet_block(libpcap_write_to_file, output_file,
+ success = libpcap_write_enhanced_packet_block(output_file,
NULL,
ts_sec, ts_usec,
length, length,
@@ -851,7 +851,7 @@ write_current_packet(gboolean cont)
packet_buf, direction,
&bytes_written, &err);
} else {
- success = libpcap_write_packet(libpcap_write_to_file, output_file,
+ success = libpcap_write_packet(output_file,
ts_sec, ts_usec,
length, length,
packet_buf,
@@ -895,7 +895,7 @@ write_file_header (void)
char comment[100];
g_snprintf(comment, sizeof(comment), "Generated from input file %s.", input_filename);
- success = libpcap_write_session_header_block(libpcap_write_to_file, output_file,
+ success = libpcap_write_session_header_block(output_file,
comment,
NULL,
NULL,
@@ -904,7 +904,7 @@ write_file_header (void)
&bytes_written,
&err);
if (success) {
- success = libpcap_write_interface_description_block(libpcap_write_to_file, output_file,
+ success = libpcap_write_interface_description_block(output_file,
NULL,
NULL,
NULL,
@@ -918,7 +918,7 @@ write_file_header (void)
&err);
}
} else {
- success = libpcap_write_file_header(libpcap_write_to_file, output_file, pcap_link_type, PCAP_SNAPLEN,
+ success = libpcap_write_file_header(output_file, pcap_link_type, PCAP_SNAPLEN,
FALSE, &bytes_written, &err);
}
if (!success) {
@@ -935,7 +935,7 @@ write_file_trailer (void)
gboolean success;
if (use_pcapng) {
- success = libpcap_write_interface_statistics_block(libpcap_write_to_file, output_file,
+ success = libpcap_write_interface_statistics_block(output_file,
0,
&bytes_written,
"Counters provided by text2pcap",