aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/proto.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/epan/proto.h b/epan/proto.h
index d6710e40b8..e502953083 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.60 2004/05/01 18:39:07 ulfl Exp $
+ * $Id: proto.h,v 1.61 2004/05/01 20:15:56 obiot Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -52,7 +52,7 @@ struct _value_string;
/* ... and similarly, */
#define TFS(x) (const struct true_false_string*)(x)
-extern struct _protocol;
+struct _protocol;
typedef struct _protocol protocol_t;
@@ -156,11 +156,15 @@ typedef proto_node proto_item;
/* indicate that this field should not be shown by Ethereal (used for filtering only) */
-#define PROTO_ITEM_IS_HIDDEN(proto_item) if(proto_item) FI_GET_FLAG(proto_item->finfo, FI_HIDDEN)
-#define PROTO_ITEM_SET_HIDDEN(proto_item) if(proto_item) FI_SET_FLAG(proto_item->finfo, FI_HIDDEN)
+#define PROTO_ITEM_IS_HIDDEN(proto_item) \
+ ((proto_item) ? FI_GET_FLAG(proto_item->finfo, FI_HIDDEN) : 0)
+#define PROTO_ITEM_SET_HIDDEN(proto_item) \
+ ((proto_item) ? FI_SET_FLAG(proto_item->finfo, FI_HIDDEN) : 0)
/* indicate that this field is generated by Ethereal (and not inside the packet data) */
-#define PROTO_ITEM_IS_GENERATED(proto_item) if(proto_item) FI_GET_FLAG(proto_item->finfo, FI_GENERATED)
-#define PROTO_ITEM_SET_GENERATED(proto_item) if(proto_item) FI_SET_FLAG(proto_item->finfo, FI_GENERATED)
+#define PROTO_ITEM_IS_GENERATED(proto_item) \
+ ((proto_item) ? FI_GET_FLAG(proto_item->finfo, FI_GENERATED) : 0)
+#define PROTO_ITEM_SET_GENERATED(proto_item) \
+ ((proto_item) ? FI_SET_FLAG(proto_item->finfo, FI_GENERATED) : 0)
typedef void (*proto_tree_foreach_func)(proto_node *, gpointer);