aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/ber.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/ber.c
parent887cce4a5f4a03a74899d8f7388550aeaed7edc5 (diff)
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/ber.c')
-rw-r--r--wiretap/ber.c41
1 files changed, 27 insertions, 14 deletions
diff --git a/wiretap/ber.c b/wiretap/ber.c
index 74e87d7dbd..c147f543fc 100644
--- a/wiretap/ber.c
+++ b/wiretap/ber.c
@@ -31,12 +31,12 @@
#include "ber.h"
-#define BER_CLASS_UNI 0
-#define BER_CLASS_APP 1
-#define BER_CLASS_CON 2
+#define BER_CLASS_UNI 0
+#define BER_CLASS_APP 1
+#define BER_CLASS_CON 2
-#define BER_UNI_TAG_SEQ 16 /* SEQUENCE, SEQUENCE OF */
-#define BER_UNI_TAG_SET 17 /* SET, SET OF */
+#define BER_UNI_TAG_SEQ 16 /* SEQUENCE, SEQUENCE OF */
+#define BER_UNI_TAG_SET 17 /* SET, SET OF */
static gboolean ber_read_file(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
Buffer *buf, int *err, gchar **err_info)
@@ -54,7 +54,7 @@ static gboolean ber_read_file(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
*/
*err = WTAP_ERR_BAD_FILE;
*err_info = g_strdup_printf("ber: File has %" G_GINT64_MODIFIER "d-byte packet, bigger than maximum of %u",
- file_size, WTAP_MAX_PACKET_SIZE);
+ file_size, WTAP_MAX_PACKET_SIZE);
return FALSE;
}
packet_size = (int)file_size;
@@ -89,7 +89,7 @@ static gboolean ber_read(wtap *wth, int *err, gchar **err_info, gint64 *data_off
}
static gboolean ber_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr _U_,
- Buffer *buf, int *err, gchar **err_info)
+ Buffer *buf, int *err, gchar **err_info)
{
/* there is only one packet */
if(seek_off > 0) {
@@ -133,7 +133,7 @@ wtap_open_return_val ber_open(wtap *wth, int *err, gchar **err_info)
/* XXX: do we also want to allow APPLICATION */
if(!(ber_pc &&
(((ber_class == BER_CLASS_UNI) && ((ber_tag == BER_UNI_TAG_SET) || (ber_tag == BER_UNI_TAG_SEQ))) ||
- ((ber_class == BER_CLASS_CON) && (ber_tag < 32)))))
+ ((ber_class == BER_CLASS_CON) && (ber_tag < 32)))))
return WTAP_OPEN_NOT_MINE;
/* now check the length */
@@ -149,12 +149,12 @@ wtap_open_return_val ber_open(wtap *wth, int *err, gchar **err_info)
nlb = oct & 0x7F; /* number of length bytes */
if((nlb > 0) && (nlb <= (BER_BYTES_TO_CHECK - 2))) {
- /* not indefinite length and we have read enough bytes to compute the length */
- i = nlb;
- while(i--) {
- oct = bytes[offset++];
- len = (len<<8) + oct;
- }
+ /* not indefinite length and we have read enough bytes to compute the length */
+ i = nlb;
+ while(i--) {
+ oct = bytes[offset++];
+ len = (len<<8) + oct;
+ }
}
}
@@ -182,3 +182,16 @@ wtap_open_return_val ber_open(wtap *wth, int *err, gchar **err_info)
return WTAP_OPEN_MINE;
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */