[ofa-general] [PATCH] libibmad: Declare some enums as typedefs for cleaner function interfaces

Sean Hefty sean.hefty at intel.com
Mon Feb 2 21:29:16 PST 2009


>@@ -595,21 +595,21 @@ typedef struct ib_vendor_call {
> #define MAD_DEF_RETRIES                3
> #define MAD_DEF_TIMEOUT_MS     1000
>
>-enum {
>+typedef enum {
>        IB_DEST_LID,
>        IB_DEST_DRPATH,
>        IB_DEST_GUID,
>        IB_DEST_DRSLID,
>-};
>+} mad_dest_t;
>
>-enum {
>+typedef enum {
>        IB_NODE_CA = 1,
>        IB_NODE_SWITCH,
>        IB_NODE_ROUTER,
>        NODE_RNIC,
>
>        IB_NODE_MAX = NODE_RNIC
>-};
>+} mad_node_type_t;

For consistency, should these be named enums?  (MAD_DEST and MAD_NODE_TYPE)

- Sean




More information about the general mailing list