diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-21 11:03:30 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-21 11:03:30 +0000 |
commit | 27f7d88c840a704b1b41324ace2e0fd3c2806857 (patch) | |
tree | 924290365ef9fa9081ef7aede148bdd47a51aeb0 /epan/proto.h | |
parent | 1108352f008b3fb0e53c56110edc71af507734b0 (diff) |
Also fake empty field_info's by gracefully handling NULL field_info pointer elsewhere.
svn path=/trunk/; revision=29490
Diffstat (limited to 'epan/proto.h')
-rw-r--r-- | epan/proto.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/proto.h b/epan/proto.h index 8b74613f94..20c117d2da 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -245,11 +245,10 @@ typedef struct field_info { /** The protocol field is actually a URL */ #define FI_URL 0x00000004 - /** convenience macro to get field_info.flags */ -#define FI_GET_FLAG(fi, flag) (fi->flags & flag) +#define FI_GET_FLAG(fi, flag) ((fi) ? (fi->flags & flag) : 0) /** convenience macro to set field_info.flags */ -#define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) +#define FI_SET_FLAG(fi, flag) ((fi) ? (fi->flags = fi->flags | flag) : 0) /** One of these exists for the entire protocol tree. Each proto_node * in the protocol tree points to the same copy. */ |