summaryrefslogtreecommitdiff
path: root/wiretap/libpcap.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2015-01-01 19:45:22 -0500
committerBill Meier <wmeier@newsguy.com>2015-01-02 00:49:09 +0000
commit454fd6e9eb3009cd346443ba06498904d6cea228 (patch)
treed7b5e3e699e0992a0d767b7017fbac44a0531069 /wiretap/libpcap.c
parent887cce4a5f4a03a74899d8f7388550aeaed7edc5 (diff)
downloadwireshark-454fd6e9eb3009cd346443ba06498904d6cea228.tar.gz
Add "Editor modelines"; Adjust whitespace as needed.
Change-Id: Ic5a5acb0f36d3aa144edbfb1ae71097b18426db4 Reviewed-on: https://code.wireshark.org/review/6216 Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r--wiretap/libpcap.c45
1 files changed, 29 insertions, 16 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c
index 19712f1ee5..065f85d448 100644
--- a/wiretap/libpcap.c
+++ b/wiretap/libpcap.c
@@ -566,21 +566,21 @@ static int libpcap_try_header(wtap *wth, FILE_T fh, int *err, gchar **err_info,
ret++;
}
- if (hdr->hdr.orig_len > 64*1024*1024) {
- /*
- * In theory I guess the on-the-wire packet size can be
- * arbitrarily large, and it can certainly be larger than the
- * maximum snapshot length which bounds the snapshot size,
- * but any file claiming 64MB in a single packet is *probably*
- * corrupt, and treating them as such makes the heuristics
- * much more reliable. See, for example,
- *
- * https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9634
- *
- * (64MB is an arbitrary size at this point).
- */
- ret++;
- }
+ if (hdr->hdr.orig_len > 64*1024*1024) {
+ /*
+ * In theory I guess the on-the-wire packet size can be
+ * arbitrarily large, and it can certainly be larger than the
+ * maximum snapshot length which bounds the snapshot size,
+ * but any file claiming 64MB in a single packet is *probably*
+ * corrupt, and treating them as such makes the heuristics
+ * much more reliable. See, for example,
+ *
+ * https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9634
+ *
+ * (64MB is an arbitrary size at this point).
+ */
+ ret++;
+ }
if (hdr->hdr.incl_len > wth->snapshot_length) {
/*
@@ -995,6 +995,19 @@ static gboolean libpcap_dump(wtap_dumper *wdh,
if (!wtap_dump_file_write(wdh, pd, phdr->caplen, err))
return FALSE;
- wdh->bytes_dumped += phdr->caplen;
+ wdh->bytes_dumped += phdr->caplen;
return TRUE;
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */