]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_packet.c
*: Properly use memset() when zeroing
[mirror_frr.git] / bgpd / bgp_packet.c
index 9a1216a031dbd141629ed5537868882d3d848db1..459b4d5e3f951d50a9127e84402dae7c9c507ec6 100644 (file)
@@ -1710,7 +1710,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
        }
 
        /* Set initial values. */
-       memset(&attr, 0, sizeof(struct attr));
+       memset(&attr, 0, sizeof(attr));
        attr.label_index = BGP_INVALID_LABEL_INDEX;
        attr.label = MPLS_INVALID_LABEL;
        memset(&nlris, 0, sizeof(nlris));
@@ -2249,8 +2249,7 @@ static int bgp_route_refresh_receive(struct peer *peer, bgp_size_t size)
                                         * to maximise debug information.
                                         */
                                        int ok;
-                                       memset(&orfp, 0,
-                                              sizeof(struct orf_prefix));
+                                       memset(&orfp, 0, sizeof(orfp));
                                        common = *p_pnt++;
                                        /* after ++: p_pnt <= p_end */
                                        if (common