From: Olivier Dugeon Date: Mon, 31 Jul 2017 14:39:00 +0000 (+0200) Subject: Correct code style as requested by review of PR839 X-Git-Tag: frr-4.0-dev~475^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a6df2b80d7f7f7f9b7329c15555bdd6f4bb4812d;p=mirror%2Ffrr.git Correct code style as requested by review of PR839 * As per https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl script result, remove extra white space and add TAB when necessary Signed-off-by: Olivier Dugeon --- diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h index 60435e502e..2470cd2e2b 100644 --- a/ospfd/ospf_opaque.h +++ b/ospfd/ospf_opaque.h @@ -82,33 +82,31 @@ * used for various LSA opaque usage e.g. Traffic Engineering. */ struct tlv_header { - u_int16_t type; /* Type of Value */ - u_int16_t length; /* Length of Value portion only, in bytes */ + u_int16_t type; /* Type of Value */ + u_int16_t length; /* Length of Value portion only, in bytes */ }; -#define TLV_HDR_SIZE \ - (sizeof (struct tlv_header)) +#define TLV_HDR_SIZE (sizeof(struct tlv_header)) #define TLV_BODY_SIZE(tlvh) \ - (ROUNDUP (ntohs ((tlvh)->length), sizeof (u_int32_t))) + (ROUNDUP(ntohs((tlvh)->length), sizeof(u_int32_t))) -#define TLV_SIZE(tlvh) \ - (TLV_HDR_SIZE + TLV_BODY_SIZE(tlvh)) +#define TLV_SIZE(tlvh) (TLV_HDR_SIZE + TLV_BODY_SIZE(tlvh)) #define TLV_HDR_TOP(lsah) \ - (struct tlv_header *)((char *)(lsah) + OSPF_LSA_HEADER_SIZE) + (struct tlv_header *)((char *)(lsah) + OSPF_LSA_HEADER_SIZE) #define TLV_HDR_NEXT(tlvh) \ - (struct tlv_header *)((char *)(tlvh) + TLV_SIZE(tlvh)) + (struct tlv_header *)((char *)(tlvh) + TLV_SIZE(tlvh)) #define TLV_HDR_SUBTLV(tlvh) \ - (struct tlv_header *)((char *)(tlvh) + TLV_HDR_SIZE) + (struct tlv_header *)((char *)(tlvh) + TLV_HDR_SIZE) -#define TLV_DATA(tlvh) (void *)((char *)(tlvh) + TLV_HDR_SIZE) +#define TLV_DATA(tlvh) (void *)((char *)(tlvh) + TLV_HDR_SIZE) -#define TLV_TYPE(tlvh) tlvh.header.type -#define TLV_LEN(tlvh) tlvh.header.length -#define TLV_HDR(tlvh) tlvh.header +#define TLV_TYPE(tlvh) tlvh.header.type +#define TLV_LEN(tlvh) tlvh.header.length +#define TLV_HDR(tlvh) tlvh.header /* Following declaration concerns the Opaque LSA management */ enum lsa_opcode { @@ -148,7 +146,7 @@ extern int ospf_opaque_new_if(struct interface *ifp); extern int ospf_opaque_del_if(struct interface *ifp); extern void ospf_opaque_ism_change(struct ospf_interface *oi, int old_status); extern void ospf_opaque_nsm_change(struct ospf_neighbor *nbr, int old_status); -extern void ospf_opaque_config_write_router(struct vty *vty, struct ospf *); +extern void ospf_opaque_config_write_router(struct vty *vty, struct ospf *ospf); extern void ospf_opaque_config_write_if(struct vty *vty, struct interface *ifp); extern void ospf_opaque_config_write_debug(struct vty *vty); extern void show_opaque_info_detail(struct vty *vty, struct ospf_lsa *lsa); @@ -156,7 +154,7 @@ extern void ospf_opaque_lsa_dump(struct stream *s, u_int16_t length); extern void ospf_opaque_lsa_originate_schedule(struct ospf_interface *oi, int *init_delay); -extern struct ospf_lsa *ospf_opaque_lsa_install(struct ospf_lsa *, +extern struct ospf_lsa *ospf_opaque_lsa_install(struct ospf_lsa *lsa, int rt_recalc); extern struct ospf_lsa *ospf_opaque_lsa_refresh(struct ospf_lsa *lsa);