From 454fd6e9eb3009cd346443ba06498904d6cea228 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Thu, 1 Jan 2015 19:45:22 -0500 Subject: Add "Editor modelines"; Adjust whitespace as needed. Change-Id: Ic5a5acb0f36d3aa144edbfb1ae71097b18426db4 Reviewed-on: https://code.wireshark.org/review/6216 Reviewed-by: Bill Meier --- wiretap/libpcap.c | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) (limited to 'wiretap/libpcap.c') 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: + */ -- cgit v1.2.1