Don't use C++ keywords as variable names - prepend "ber_" in front of

variables with BER metadata.

svn path=/trunk/; revision=31956
This commit is contained in:
Guy Harris 2010-02-23 02:10:54 +00:00
parent dda82be58c
commit 9845a10325
1 changed files with 11 additions and 11 deletions

View File

@ -117,10 +117,10 @@ int ber_open(wtap *wth, int *err, gchar **err_info _U_)
#define BER_BYTES_TO_CHECK 8 #define BER_BYTES_TO_CHECK 8
guint8 bytes[BER_BYTES_TO_CHECK]; guint8 bytes[BER_BYTES_TO_CHECK];
int bytes_read; int bytes_read;
guint8 id; guint8 ber_id;
gint8 class; gint8 ber_class;
gint8 tag; gint8 ber_tag;
gboolean pc; gboolean ber_pc;
guint8 oct, nlb = 0; guint8 oct, nlb = 0;
int len = 0; int len = 0;
gint64 file_size; gint64 file_size;
@ -132,18 +132,18 @@ int ber_open(wtap *wth, int *err, gchar **err_info _U_)
return (*err != 0) ? -1 : 0; return (*err != 0) ? -1 : 0;
} }
id = bytes[offset++]; ber_id = bytes[offset++];
class = (id>>6) & 0x03; ber_class = (ber_id>>6) & 0x03;
pc = (id>>5) & 0x01; ber_pc = (ber_id>>5) & 0x01;
tag = id & 0x1F; ber_tag = ber_id & 0x1F;
/* it must be constructed and either a SET or a SEQUENCE */ /* it must be constructed and either a SET or a SEQUENCE */
/* or a CONTEXT less than 32 (arbitrary) */ /* or a CONTEXT less than 32 (arbitrary) */
/* XXX: do we also want to allow APPLICATION */ /* XXX: do we also want to allow APPLICATION */
if(!(pc && if(!(ber_pc &&
(((class == BER_CLASS_UNI) && ((tag == BER_UNI_TAG_SET) || (tag == BER_UNI_TAG_SEQ))) || (((ber_class == BER_CLASS_UNI) && ((ber_tag == BER_UNI_TAG_SET) || (ber_tag == BER_UNI_TAG_SEQ))) ||
((class == BER_CLASS_CON) && (tag < 32))))) ((ber_class == BER_CLASS_CON) && (ber_tag < 32)))))
return 0; return 0;
/* now check the length */ /* now check the length */