]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove function specifier 'inline' in printers
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 26 Jan 2018 14:15:58 +0000 (15:15 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 26 Jan 2018 19:59:32 +0000 (20:59 +0100)
It was mostly used with large functions.

Moreover:
Put some function definition names at the beginning of line.
Fix a space.

20 files changed:
addrtoname.c
print-ap1394.c
print-arcnet.c
print-cip.c
print-dccp.c
print-ether.c
print-fddi.c
print-forces.c
print-hncp.c
print-ipfc.c
print-ipnet.c
print-lisp.c
print-nflog.c
print-null.c
print-pktap.c
print-ppi.c
print-sctp.c
print-sll.c
print-symantec.c
print-token.c

index 499a6648d2a76cb9eb17af274d24671714d739df..ac79c0f24980224f8810dfcd8c89642f3871de81 100644 (file)
@@ -406,7 +406,7 @@ static const char hex[16] = {
 
 /* Find the hash node that corresponds the ether address 'ep' */
 
-static inline struct enamemem *
+static struct enamemem *
 lookup_emem(netdissect_options *ndo, const u_char *ep)
 {
        u_int i, j, k;
@@ -439,7 +439,7 @@ lookup_emem(netdissect_options *ndo, const u_char *ep)
  * with length 'nlen'
  */
 
-static inline struct bsnamemem *
+static struct bsnamemem *
 lookup_bytestring(netdissect_options *ndo, const u_char *bs,
                  const unsigned int nlen)
 {
@@ -487,7 +487,7 @@ lookup_bytestring(netdissect_options *ndo, const u_char *bs,
 
 /* Find the hash node that corresponds the NSAP 'nsap' */
 
-static inline struct enamemem *
+static struct enamemem *
 lookup_nsap(netdissect_options *ndo, const u_char *nsap,
            u_int nsap_length)
 {
@@ -532,7 +532,7 @@ lookup_nsap(netdissect_options *ndo, const u_char *nsap,
 
 /* Find the hash node that corresponds the protoid 'pi'. */
 
-static inline struct protoidmem *
+static struct protoidmem *
 lookup_protoid(netdissect_options *ndo, const u_char *pi)
 {
        u_int i, j;
index 6ad592e56ecdad037108c230e58cd8d10d5c7cb0..d39f27f7cf4df9515655515a5b934fd426349244 100644 (file)
@@ -55,7 +55,7 @@ fwaddr_string(netdissect_options *ndo, const u_char *addr)
        return (linkaddr_string(ndo, addr, LINKADDR_IEEE1394, FIREWIRE_EUI64_LEN));
 }
 
-static inline void
+static void
 ap1394_hdr_print(netdissect_options *ndo, const u_char *bp, u_int length)
 {
        const struct firewire_header *fp;
index 1b4651066992f99e0c228f2b512e6e442d988bd2..469361efebaadc71917fa2c9743b990a01146120 100644 (file)
@@ -118,7 +118,7 @@ static const struct tok arctypemap[] = {
        { 0, 0 }
 };
 
-static inline void
+static void
 arcnet_print(netdissect_options *ndo, const u_char *bp, u_int length, int phds,
              u_int flag, u_int seqid)
 {
index debdc3f600e01d5ee836f0eeb2d8dc67810e0c9b..a85388671135f43423d6be20131abe787440d31e 100644 (file)
@@ -41,7 +41,7 @@ static const unsigned char rfcllc[] = {
        0x00,
        0x00 };
 
-static inline void
+static void
 cip_print(netdissect_options *ndo, u_int length)
 {
        /*
index 7c092a8afe35a66435ad548d845fb4240ab41915..b36f1072b988420b0157e51b862b89c2275efba5 100644 (file)
@@ -191,7 +191,8 @@ static const char *dccp_feature_nums[] = {
        "check data checksum",
 };
 
-static inline u_int dccp_csum_coverage(const struct dccp_hdr* dh, u_int len)
+static u_int
+dccp_csum_coverage(const struct dccp_hdr* dh, u_int len)
 {
        u_int cov;
 
@@ -237,7 +238,8 @@ static uint64_t dccp_seqno(const u_char *bp)
        return seqno;
 }
 
-static inline unsigned int dccp_basic_hdr_len(const struct dccp_hdr *dh)
+static unsigned int
+dccp_basic_hdr_len(const struct dccp_hdr *dh)
 {
        return DCCPH_X(dh) ? sizeof(struct dccp_hdr_ext) : sizeof(struct dccp_hdr);
 }
index 73947a05773f4bc7b6be7a0c0c469fbd0e6bd1e6..e09f2ac9b64e9e798491c565f78d9d5d71e1b90b 100644 (file)
@@ -104,7 +104,7 @@ const struct tok ethertype_values[] = {
     { 0, NULL}
 };
 
-static inline void
+static void
 ether_hdr_print(netdissect_options *ndo,
                 const u_char *bp, u_int length)
 {
index a174d088802ccab028b4f20cad383662ea552655..f87c00f7c93cb668f8fae4854319bcfa4f4e59d7 100644 (file)
@@ -158,7 +158,7 @@ static const u_char fddi_bit_swap[] = {
 /*
  * Print FDDI frame-control bits
  */
-static inline void
+static void
 print_fddi_fc(netdissect_options *ndo, u_char fc)
 {
        switch (fc) {
@@ -226,7 +226,7 @@ print_fddi_fc(netdissect_options *ndo, u_char fc)
 }
 
 /* Extract src, dst addresses */
-static inline void
+static void
 extract_fddi_addrs(const struct fddi_header *fddip, char *fsrc, char *fdst)
 {
        int i;
@@ -250,7 +250,7 @@ extract_fddi_addrs(const struct fddi_header *fddip, char *fsrc, char *fdst)
 /*
  * Print the FDDI MAC header
  */
-static inline void
+static void
 fddi_hdr_print(netdissect_options *ndo,
                const struct fddi_header *fddip, u_int length,
                const u_char *fsrc, const u_char *fdst)
@@ -267,7 +267,7 @@ fddi_hdr_print(netdissect_options *ndo,
               length);
 }
 
-static inline void
+static void
 fddi_smt_print(netdissect_options *ndo, const u_char *p _U_, u_int length _U_)
 {
        ND_PRINT("<SMT printer not yet implemented>");
index 726c2f8344239beacc0f67e035afed86136c2af9..6835522a8e7605f0e759712a4a1c8c75a29508f0 100644 (file)
@@ -86,7 +86,8 @@ enum {
 };
 #define TOM_MAX_IND (_TOM_RSV_MAX - 1)
 
-static inline int tom_valid(uint8_t tom)
+static int
+tom_valid(uint8_t tom)
 {
        if (tom > 0) {
                if (tom >= 0x7 && tom <= 0xe)
@@ -100,7 +101,8 @@ static inline int tom_valid(uint8_t tom)
                return 0;
 }
 
-static inline const char *ForCES_node(uint32_t node)
+static const char *
+ForCES_node(uint32_t node)
 {
        if (node <= 0x3FFFFFFF)
                return "FE";
@@ -276,7 +278,8 @@ static const struct optlv_h OPTLV_msg[F_OP_MAX + 1] = {
        /* F_OP_RTRCOMP */ {ZERO_TTLV, 0, " RTRCOMP", NULL},
 };
 
-static inline const struct optlv_h *get_forces_optlv_h(uint16_t opt)
+static const struct optlv_h *
+get_forces_optlv_h(uint16_t opt)
 {
        if (opt > F_OP_MAX || opt == F_OP_RSV)
                return &OPTLV_msg[F_OP_RSV];
@@ -290,7 +293,8 @@ static inline const struct optlv_h *get_forces_optlv_h(uint16_t opt)
 #define IND_SUF 0x0
 static char ind_buf[IND_SIZE];
 
-static inline char *indent_pr(int indent, int nlpref)
+static char *
+indent_pr(int indent, int nlpref)
 {
        int i = 0;
        char *r = ind_buf;
@@ -311,7 +315,8 @@ static inline char *indent_pr(int indent, int nlpref)
        return r;
 }
 
-static inline int op_valid(uint16_t op, uint16_t mask)
+static int
+op_valid(uint16_t op, uint16_t mask)
 {
        if (op == 0)
                return 0;
@@ -357,7 +362,8 @@ static const struct tok ForCES_TLV[] = {
 };
 
 #define TLV_HLN        4
-static inline int ttlv_valid(uint16_t ttlv)
+static int
+ttlv_valid(uint16_t ttlv)
 {
        if (ttlv > 0) {
                if (ttlv == 1 || ttlv == 0x1000)
@@ -408,7 +414,8 @@ static const struct tok ForCES_TLV_err[] = {
        {0, NULL}
 };
 
-static inline u_int tlv_valid(u_int tlvl, u_int rlen)
+static u_int
+tlv_valid(u_int tlvl, u_int rlen)
 {
        if (rlen < TLV_HDRL)
                return INVALID_RLEN;
@@ -422,7 +429,8 @@ static inline u_int tlv_valid(u_int tlvl, u_int rlen)
        return 0;
 }
 
-static inline int ilv_valid(const struct forces_ilv *ilv, u_int rlen)
+static int
+ilv_valid(const struct forces_ilv *ilv, u_int rlen)
 {
        if (rlen < ILV_HDRL)
                return INVALID_RLEN;
@@ -478,7 +486,8 @@ static const struct tom_h ForCES_msg[TOM_MAX_IND + 1] = {
            {TOM_QUERYREP, TTLV_T2, CFG_QYR, "Query Response", lfbselect_print},
 };
 
-static inline const struct tom_h *get_forces_tom(uint8_t tom)
+static const struct tom_h *
+get_forces_tom(uint8_t tom)
 {
        int i;
        for (i = TOM_RSV_I; i <= TOM_MAX_IND; i++) {
@@ -509,14 +518,15 @@ enum {
 };
 #define PD_MAX_IND (_TOM_RSV_MAX - 1)
 
-static inline int pd_valid(uint16_t pd)
+static int
+pd_valid(uint16_t pd)
 {
        if (pd >= F_TLV_PDAT && pd <= F_TLV_REST)
                return 1;
        return 0;
 }
 
-static inline void
+static void
 chk_op_type(netdissect_options *ndo,
             uint16_t type, uint16_t msk, uint16_t omsk)
 {
@@ -564,7 +574,8 @@ static const struct pdata_ops ForCES_pdata[PD_MAX_IND + 1] = {
            {F_TLV_PDAT, 0, 0, "Inner PATH-DATA TLV", recpdoptlv_print},
 };
 
-static inline const struct pdata_ops *get_forces_pd(uint16_t pd)
+static const struct pdata_ops *
+get_forces_pd(uint16_t pd)
 {
        int i;
        for (i = PD_RSV_I + 1; i <= PD_MAX_IND; i++) {
index 0433faebc579154ebadf88db2a3ecc035d5d34a0..0dee297f4cad9ae71f4a1b60aa67ae0c9b747672 100644 (file)
@@ -145,7 +145,7 @@ static const struct tok dh6opt_str[] = {
 /*
  * Is an IPv6 address an IPv4-mapped address?
  */
-static inline int
+static int
 is_ipv4_mapped_address(const u_char *addr)
 {
     /* The value of the prefix */
index 8205c978f8a732d6330a91f16130d349a73e732a..6c751380553b6baa2f5ddab7b31d5e27b2b87323 100644 (file)
@@ -42,7 +42,7 @@ struct ipfc_header {
 #define IPFC_HDRLEN 16
 
 /* Extract src, dst addresses */
-static inline void
+static void
 extract_ipfc_addrs(const struct ipfc_header *ipfcp, char *ipfcsrc,
     char *ipfcdst)
 {
@@ -57,7 +57,7 @@ extract_ipfc_addrs(const struct ipfc_header *ipfcp, char *ipfcsrc,
 /*
  * Print the Network_Header
  */
-static inline void
+static void
 ipfc_hdr_print(netdissect_options *ndo,
           const struct ipfc_header *ipfcp _U_,
           u_int length, const u_char *ipfcsrc,
index fa26d29b559914cc54c0b7a06450a77205fb7c50..9777909b48fd94aacfa4d7421c036b1677605f64 100644 (file)
@@ -33,7 +33,7 @@ static const struct tok ipnet_values[] = {
        { 0,                    NULL }
 };
 
-static inline void
+static void
 ipnet_hdr_print(netdissect_options *ndo, const u_char *bp, u_int length)
 {
        const ipnet_hdr_t *hdr;
index 420ca11126e79ad248fb683453c9247f3172040d..01e3fa01a3b313cae27385beaec27f1991297d96 100644 (file)
@@ -222,8 +222,8 @@ typedef struct map_register_loc {
 
 #define MAP_REGISTER_LOC_LEN sizeof(lisp_map_register_loc)
 
-static inline uint8_t extract_lisp_type(uint8_t);
-static inline uint8_t is_xtr_data_present(uint8_t , uint8_t);
+static uint8_t extract_lisp_type(uint8_t);
+static uint8_t is_xtr_data_present(uint8_t, uint8_t);
 static void lisp_hdr_flag(netdissect_options *, const lisp_map_register_hdr *);
 static void action_flag(netdissect_options *, uint8_t);
 static void loc_hdr_flag(netdissect_options *, uint16_t);
@@ -393,12 +393,14 @@ invalid:
        return;
 }
 
-static inline uint8_t extract_lisp_type(uint8_t lisp_hdr_flags)
+static uint8_t
+extract_lisp_type(uint8_t lisp_hdr_flags)
 {
        return (lisp_hdr_flags) >> TYPE_INDEX;
 }
 
-static inline uint8_t is_xtr_data_present(uint8_t type, uint8_t lisp_hdr_flags)
+static uint8_t
+is_xtr_data_present(uint8_t type, uint8_t lisp_hdr_flags)
 {
        uint8_t xtr_present = 0;
 
index b93fc8c539a9820ec265703cff7a0e739e5b2402..d8328ec861af1fb1ab3f96b9a566df2941c3cf39 100644 (file)
@@ -46,7 +46,7 @@ static const struct tok nflog_values[] = {
        { 0,                    NULL }
 };
 
-static inline void
+static void
 nflog_hdr_print(netdissect_options *ndo, const nflog_hdr_t *hdr, u_int length)
 {
        ND_PRINT("version %d, resource ID %d", hdr->nflog_version, ntohs(hdr->nflog_rid));
index b859c8318a6e8c81caa3f40c17570e6c9bbaea34..874521e24aca006c9fc776815f28c25259394b1d 100644 (file)
@@ -52,7 +52,7 @@
 #define        SWAPLONG(y) \
 ((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff))
 
-static inline void
+static void
 null_hdr_print(netdissect_options *ndo, u_int family, u_int length)
 {
        if (!ndo->ndo_qflag) {
index 83f238fa6dead076fb09905c03516029c7f4354f..3f28ccb08399ffa0fdd40bf7bf2dffc54982e9c5 100644 (file)
@@ -67,7 +67,7 @@ typedef struct pktap_header {
 #define PKT_REC_NONE   0       /* nothing follows the header */
 #define PKT_REC_PACKET 1       /* a packet follows the header */
 
-static inline void
+static void
 pktap_header_print(netdissect_options *ndo, const u_char *bp, u_int length)
 {
        const pktap_header_t *hdr;
index c4505c47d730f1d01a7bb8aef68fb4c8bfd01d47..09cac11e81fd5d730a11c5728a73eac7f7239659 100644 (file)
@@ -26,7 +26,7 @@ typedef struct ppi_header {
 
 #ifdef DLT_PPI
 
-static inline void
+static void
 ppi_header_print(netdissect_options *ndo, const u_char *bp, u_int length)
 {
        const ppi_header_t *hdr;
index 5130196d654867bc8c09ea8036083e5934175602..bee474d8d8c2c2fbe27d5713d65bffff2793c396 100644 (file)
@@ -434,7 +434,8 @@ static const struct tok PayloadProto_idents[] = {
 };
 
 
-static inline int isForCES_port(u_short Port)
+static int
+isForCES_port(u_short Port)
 {
        if (Port == CHAN_HP)
                return 1;
index 1a2ba18181076ce5709b8bb633aee61da87e996f..24dc2d46939cdfedcadbc128e46862e4bea4788b 100644 (file)
@@ -129,7 +129,7 @@ static const struct tok sll_pkttype_values[] = {
     { 0, NULL}
 };
 
-static inline void
+static void
 sll_print(netdissect_options *ndo, const struct sll_header *sllp, u_int length)
 {
        u_short ether_type;
index 5edb0b4e63dbbf91bb15ea392114cd87eb28a6df..4fd834e1bf6c06d2d7ace7b6de70dd885cabebdd 100644 (file)
@@ -37,7 +37,7 @@ struct symantec_header {
        nd_byte     stuff2[36];
 };
 
-static inline void
+static void
 symantec_hdr_print(netdissect_options *ndo, const u_char *bp, u_int length)
 {
        const struct symantec_header *sp;
index 78485a3f83fdaec080356dbdd2cc5b4bb10fe64a..fa7f07f4b7b705c9c3f169fe3e8490608ae837d5 100644 (file)
@@ -92,7 +92,7 @@ struct token_header {
 static const char tstr[] = "[|token-ring]";
 
 /* Extract src, dst addresses */
-static inline void
+static void
 extract_token_addrs(const struct token_header *trp, char *fsrc, char *fdst)
 {
        memcpy(fdst, (const char *)trp->token_dhost, 6);
@@ -102,7 +102,7 @@ extract_token_addrs(const struct token_header *trp, char *fsrc, char *fdst)
 /*
  * Print the TR MAC header
  */
-static inline void
+static void
 token_hdr_print(netdissect_options *ndo,
                 const struct token_header *trp, u_int length,
                 const u_char *fsrc, const u_char *fdst)