diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-02-23 02:10:54 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-02-23 02:10:54 +0000 |
commit | 9845a10325d4ef97197aff1ba867c8084edaeed3 (patch) | |
tree | 86cebd1df77787ec5194b79075788284b36c3b00 /wiretap | |
parent | dda82be58c33c4c57eb7d3604ae8fd3dd43ef3e4 (diff) |
Don't use C++ keywords as variable names - prepend "ber_" in front of
variables with BER metadata.
svn path=/trunk/; revision=31956
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/ber.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/wiretap/ber.c b/wiretap/ber.c index 5d769400fa..a5f738c9ba 100644 --- a/wiretap/ber.c +++ b/wiretap/ber.c @@ -117,10 +117,10 @@ int ber_open(wtap *wth, int *err, gchar **err_info _U_) #define BER_BYTES_TO_CHECK 8 guint8 bytes[BER_BYTES_TO_CHECK]; int bytes_read; - guint8 id; - gint8 class; - gint8 tag; - gboolean pc; + guint8 ber_id; + gint8 ber_class; + gint8 ber_tag; + gboolean ber_pc; guint8 oct, nlb = 0; int len = 0; gint64 file_size; @@ -132,18 +132,18 @@ int ber_open(wtap *wth, int *err, gchar **err_info _U_) return (*err != 0) ? -1 : 0; } - id = bytes[offset++]; + ber_id = bytes[offset++]; - class = (id>>6) & 0x03; - pc = (id>>5) & 0x01; - tag = id & 0x1F; + ber_class = (ber_id>>6) & 0x03; + ber_pc = (ber_id>>5) & 0x01; + ber_tag = ber_id & 0x1F; /* it must be constructed and either a SET or a SEQUENCE */ /* or a CONTEXT less than 32 (arbitrary) */ /* XXX: do we also want to allow APPLICATION */ - if(!(pc && - (((class == BER_CLASS_UNI) && ((tag == BER_UNI_TAG_SET) || (tag == BER_UNI_TAG_SEQ))) || - ((class == BER_CLASS_CON) && (tag < 32))))) + 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))))) return 0; /* now check the length */ |