]> git.puffer.fish Git - mirror/frr.git/commitdiff
*: fix some random warnings
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 4 Sep 2018 10:27:46 +0000 (12:27 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sat, 8 Sep 2018 23:16:25 +0000 (01:16 +0200)
Signed-off-by: David Lamparter <equinox@diac24.net>
isisd/isis_bpf.c
lib/stream.c
pimd/pim_igmp_mtrace.c

index 7e8a4a4edaba81502d7ba6ec840a3c2baa431882..28750278b017eee7c198153e7cc2c70bd9017d62 100644 (file)
@@ -213,7 +213,7 @@ int isis_sock_init(struct isis_circuit *circuit)
 
 int isis_recv_pdu_bcast(struct isis_circuit *circuit, uint8_t *ssnpa)
 {
-       int bytesread = 0, bytestoread, offset, one = 1, err = ISIS_OK;
+       int bytesread = 0, bytestoread, offset, one = 1;
        uint8_t *buff_ptr;
        struct bpf_hdr *bpf_hdr;
 
@@ -249,7 +249,7 @@ int isis_recv_pdu_bcast(struct isis_circuit *circuit, uint8_t *ssnpa)
                memcpy(ssnpa, buff_ptr + bpf_hdr->bh_hdrlen + ETHER_ADDR_LEN,
                ETHER_ADDR_LEN);
 
-               err = isis_handle_pdu(circuit, ssnpa);
+               isis_handle_pdu(circuit, ssnpa);
                stream_reset(circuit->rcv_stream);
                buff_ptr += BPF_WORDALIGN(bpf_hdr->bh_hdrlen +
                                                bpf_hdr->bh_datalen);
index 55e7f6435826118df2c8735f12a3832ea7912191..589a2292568281580c8690dd2e7e453a20a272e9 100644 (file)
@@ -270,7 +270,7 @@ void stream_forward_endp(struct stream *s, size_t size)
 }
 
 /* Copy from stream to destination. */
-inline bool stream_get2(void *dst, struct stream *s, size_t size)
+bool stream_get2(void *dst, struct stream *s, size_t size)
 {
        STREAM_VERIFY_SANE(s);
 
@@ -299,7 +299,7 @@ void stream_get(void *dst, struct stream *s, size_t size)
 }
 
 /* Get next character from the stream. */
-inline bool stream_getc2(struct stream *s, uint8_t *byte)
+bool stream_getc2(struct stream *s, uint8_t *byte)
 {
        STREAM_VERIFY_SANE(s);
 
@@ -344,7 +344,7 @@ uint8_t stream_getc_from(struct stream *s, size_t from)
        return c;
 }
 
-inline bool stream_getw2(struct stream *s, uint16_t *word)
+bool stream_getw2(struct stream *s, uint16_t *word)
 {
        STREAM_VERIFY_SANE(s);
 
@@ -465,7 +465,7 @@ void stream_get_from(void *dst, struct stream *s, size_t from, size_t size)
        memcpy(dst, s->data + from, size);
 }
 
-inline bool stream_getl2(struct stream *s, uint32_t *l)
+bool stream_getl2(struct stream *s, uint32_t *l)
 {
        STREAM_VERIFY_SANE(s);
 
index 95d0278a34317a789275e5357ee9dab41b33e310..1fb624a6a0bde85f6542697ed8312eef70020c1f 100644 (file)
@@ -615,7 +615,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
        static uint32_t qry_id, qry_src;
        char mtrace_buf[MTRACE_HDR_SIZE + MTRACE_MAX_HOPS * MTRACE_RSP_SIZE];
        struct interface *ifp;
-       struct interface *out_ifp;
+       struct interface *out_ifp = NULL;
        struct pim_interface *pim_ifp;
        struct pim_instance *pim;
        struct igmp_mtrace *mtracep;