summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls_openbsd.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-03-27 21:17:37 -0300
committerRenato Westphal <renato@opensourcerouting.org>2017-03-27 21:53:07 -0300
commit283a36547a2c344bad08def82b278120374df025 (patch)
tree7731f5948987b755a720773d57ca9de12cfb308e /zebra/zebra_mpls_openbsd.c
parente07486ce0386709c7f14a7a912c4a9505f503a1e (diff)
zebra-mpls: replace legacy bzero by memset
bzero() was deprecated in POSIX.1-2001 and removed in POSIX.1-2008 in deference to memset(). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_mpls_openbsd.c')
-rw-r--r--zebra/zebra_mpls_openbsd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c
index 375f41cbb0..eaa80ac558 100644
--- a/zebra/zebra_mpls_openbsd.c
+++ b/zebra/zebra_mpls_openbsd.c
@@ -51,7 +51,7 @@ kernel_send_rtmsg_v4 (int action, mpls_label_t in_label, zebra_nhlfe_t *nhlfe)
zlog_debug ("%s: 0x%x, label=%u", __func__, action, in_label);
/* initialize header */
- bzero(&hdr, sizeof (hdr));
+ memset (&hdr, 0, sizeof (hdr));
hdr.rtm_version = RTM_VERSION;
hdr.rtm_type = action;
@@ -66,7 +66,7 @@ kernel_send_rtmsg_v4 (int action, mpls_label_t in_label, zebra_nhlfe_t *nhlfe)
iov[iovcnt++].iov_len = sizeof (hdr);
/* in label */
- bzero(&sa_label_in, sizeof (sa_label_in));
+ memset (&sa_label_in, 0, sizeof (sa_label_in));
sa_label_in.smpls_len = sizeof (sa_label_in);
sa_label_in.smpls_family = AF_MPLS;
sa_label_in.smpls_label = htonl(in_label << MPLS_LABEL_OFFSET);
@@ -79,7 +79,7 @@ kernel_send_rtmsg_v4 (int action, mpls_label_t in_label, zebra_nhlfe_t *nhlfe)
iov[iovcnt++].iov_len = sizeof (sa_label_in);
/* nexthop */
- bzero(&nexthop, sizeof (nexthop));
+ memset (&nexthop, 0, sizeof (nexthop));
nexthop.sin_len = sizeof (nexthop);
nexthop.sin_family = AF_INET;
nexthop.sin_addr = nhlfe->nexthop->gate.ipv4;
@@ -94,7 +94,7 @@ kernel_send_rtmsg_v4 (int action, mpls_label_t in_label, zebra_nhlfe_t *nhlfe)
/* If action is RTM_DELETE we have to get rid of MPLS infos */
if (action != RTM_DELETE)
{
- bzero(&sa_label_out, sizeof (sa_label_out));
+ memset (&sa_label_out, 0, sizeof (sa_label_out));
sa_label_out.smpls_len = sizeof (sa_label_out);
sa_label_out.smpls_family = AF_MPLS;
sa_label_out.smpls_label =
@@ -147,7 +147,7 @@ kernel_send_rtmsg_v6 (int action, mpls_label_t in_label, zebra_nhlfe_t *nhlfe)
zlog_debug ("%s: 0x%x, label=%u", __func__, action, in_label);
/* initialize header */
- bzero(&hdr, sizeof (hdr));
+ memset (&hdr, 0, sizeof (hdr));
hdr.rtm_version = RTM_VERSION;
hdr.rtm_type = action;
@@ -162,7 +162,7 @@ kernel_send_rtmsg_v6 (int action, mpls_label_t in_label, zebra_nhlfe_t *nhlfe)
iov[iovcnt++].iov_len = sizeof (hdr);
/* in label */
- bzero(&sa_label_in, sizeof (sa_label_in));
+ memset (&sa_label_in, 0, sizeof (sa_label_in));
sa_label_in.smpls_len = sizeof (sa_label_in);
sa_label_in.smpls_family = AF_MPLS;
sa_label_in.smpls_label = htonl(in_label << MPLS_LABEL_OFFSET);
@@ -203,7 +203,7 @@ kernel_send_rtmsg_v6 (int action, mpls_label_t in_label, zebra_nhlfe_t *nhlfe)
/* If action is RTM_DELETE we have to get rid of MPLS infos */
if (action != RTM_DELETE)
{
- bzero(&sa_label_out, sizeof (sa_label_out));
+ memset (&sa_label_out, 0, sizeof (sa_label_out));
sa_label_out.smpls_len = sizeof (sa_label_out);
sa_label_out.smpls_family = AF_MPLS;
sa_label_out.smpls_label =