summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/log.c
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-02-27 13:12:13 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-02-27 13:12:13 +0000
commita458571f1903e5f772b13da17b87d5825a92a8d2 (patch)
tree11f7ccfd17b076d3fabbc76cbfa9616e8ba277f4 /sbin/isakmpd/log.c
parent029d751cb54abd6e29954490d7a1ab467b7202f5 (diff)
where possible, use bzero instead of memset
ok cloder henning
Diffstat (limited to 'sbin/isakmpd/log.c')
-rw-r--r--sbin/isakmpd/log.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/isakmpd/log.c b/sbin/isakmpd/log.c
index 3b904e43a2e..b4abd320148 100644
--- a/sbin/isakmpd/log.c
+++ b/sbin/isakmpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.50 2004/11/08 11:59:37 hshoexer Exp $ */
+/* $OpenBSD: log.c,v 1.51 2005/02/27 13:12:12 hshoexer Exp $ */
/* $EOM: log.c,v 1.30 2000/09/29 08:19:23 niklas Exp $ */
/*
@@ -322,7 +322,7 @@ log_debug_toggle(void)
LOG_DBG((LOG_MISC, 50, "log_debug_toggle: "
"debug levels cleared"));
memcpy(&log_level_copy, &log_level, sizeof log_level);
- memset(&log_level, 0, sizeof log_level);
+ bzero(&log_level, sizeof log_level);
} else {
memcpy(&log_level, &log_level_copy, sizeof log_level);
LOG_DBG((LOG_MISC, 50, "log_debug_toggle: "
@@ -518,8 +518,8 @@ log_packet_iov(struct sockaddr *src, struct sockaddr *dst, struct iovec *iov,
off += iov[i].iov_len;
}
- memset(&hdr, 0, sizeof hdr);
- memset(&udp, 0, sizeof udp);
+ bzero(&hdr, sizeof hdr);
+ bzero(&udp, sizeof udp);
/* isakmp - turn off the encryption bit in the isakmp hdr */
isakmphdr = (struct isakmp_hdr *) packet_buf;
@@ -638,7 +638,7 @@ udp_cksum(struct packhdr *hdr, const struct udphdr *u, u_int16_t *d)
u_int32_t sum;
/* Setup pseudoheader. */
- memset(phu.pa, 0, sizeof phu);
+ bzero(phu.pa, sizeof phu);
switch (ntohl(hdr->sa_family)) {
case AF_INET:
ip4 = &hdr->ip.ip4;