-/* $OpenBSD: sys_socket.c,v 1.18 2014/03/30 21:54:48 guenther Exp $ */
+/* $OpenBSD: sys_socket.c,v 1.19 2014/07/13 15:52:38 tedu Exp $ */
/* $NetBSD: sys_socket.c,v 1.13 1995/08/12 23:59:09 mycroft Exp $ */
/*
{
struct socket *so = fp->f_data;
- bzero(ub, sizeof (*ub));
+ memset(ub, 0, sizeof (*ub));
ub->st_mode = S_IFSOCK;
if ((so->so_state & SS_CANTRCVMORE) == 0 ||
so->so_rcv.sb_cc != 0)
-/* $OpenBSD: tty_subr.c,v 1.28 2014/07/12 18:43:32 tedu Exp $ */
+/* $OpenBSD: tty_subr.c,v 1.29 2014/07/13 15:52:38 tedu Exp $ */
/* $NetBSD: tty_subr.c,v 1.13 1996/02/09 19:00:43 christos Exp $ */
/*
if (cc > count)
cc = count;
bcopy(clp->c_cf, p, cc);
- bzero(clp->c_cf, cc);
+ memset(clp->c_cf, 0, cc);
if (clp->c_cq)
clrbits(clp->c_cq, clp->c_cf - clp->c_cs, cc);
count -= cc;
-/* $OpenBSD: uipc_mbuf.c,v 1.191 2014/07/13 09:52:48 dlg Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.192 2014/07/13 15:52:38 tedu Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
m->m_nextpkt = NULL;
m->m_data = m->m_pktdat;
m->m_flags = M_PKTHDR;
- bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
+ memset(&m->m_pkthdr, 0, sizeof(m->m_pkthdr));
m->m_pkthdr.pf.prio = IFQ_DEFPRIO;
}
return (m);
m->m_nextpkt = NULL;
m->m_data = m->m_pktdat;
m->m_flags = M_PKTHDR;
- bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
+ memset(&m->m_pkthdr, 0, sizeof(m->m_pkthdr));
m->m_pkthdr.pf.prio = IFQ_DEFPRIO;
return (m);
goto out;
}
}
- bzero(mtod(n, caddr_t), off);
+ memset(mtod(n, caddr_t), 0, off);
n->m_len = len + off;
m->m_next = n;
}
-/* $OpenBSD: uipc_socket.c,v 1.129 2014/07/09 15:43:33 tedu Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.130 2014/07/13 15:52:38 tedu Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
socantrcvmore(so);
sbunlock(sb);
asb = *sb;
- bzero(sb, sizeof (*sb));
- /* XXX - the bzero stomps all over so_rcv */
+ memset(sb, 0, sizeof (*sb));
+ /* XXX - the memset stomps all over so_rcv */
if (asb.sb_flags & SB_KNOTE) {
sb->sb_sel.si_note = asb.sb_sel.si_note;
sb->sb_flags = SB_KNOTE;
m->m_nextpkt = NULL;
if (m->m_flags & M_PKTHDR) {
m_tag_delete_chain(m);
- bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
+ memset(&m->m_pkthdr, 0, sizeof(m->m_pkthdr));
m->m_pkthdr.len = len;
m->m_pkthdr.pf.prio = IFQ_DEFPRIO;
}
-/* $OpenBSD: uipc_usrreq.c,v 1.75 2014/07/13 15:29:04 tedu Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.76 2014/07/13 15:52:38 tedu Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
nam2->m_len = sizeof(struct sockaddr_un);
memcpy(mtod(nam2, struct sockaddr_un *), soun,
offsetof(struct sockaddr_un, sun_path) + pathlen);
- /* No need to NUL terminate: m_getclr() returns bzero'd mbufs. */
+ /* No need to NUL terminate: m_getclr() returns zero'd mbufs. */
soun = mtod(nam2, struct sockaddr_un *);