summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbcook <>2014-11-26 05:39:06 +0000
committerbcook <>2014-11-26 05:39:06 +0000
commit03d95c2cd2c8c51b99d99abdf835cf31e4812725 (patch)
treed0480cc7a47101eff47042613022fef4eb47729f /src
parent03b877a53bb53b621e1b711ba68b8743024bc216 (diff)
downloadopenbsd-03d95c2cd2c8c51b99d99abdf835cf31e4812725.tar.gz
openbsd-03d95c2cd2c8c51b99d99abdf835cf31e4812725.tar.bz2
openbsd-03d95c2cd2c8c51b99d99abdf835cf31e4812725.zip
memset like a normal human.
ok beck@ tedu@ miod@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bio/bss_dgram.c20
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_dgram.c20
2 files changed, 20 insertions, 20 deletions
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c
index 9809eda92e..b71311be0c 100644
--- a/src/lib/libcrypto/bio/bss_dgram.c
+++ b/src/lib/libcrypto/bio/bss_dgram.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_dgram.c,v 1.35 2014/11/26 05:37:26 bcook Exp $ */ 1/* $OpenBSD: bss_dgram.c,v 1.36 2014/11/26 05:39:06 bcook Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -325,7 +325,7 @@ dgram_read(BIO *b, char *out, int outl)
325 325
326 if (out != NULL) { 326 if (out != NULL) {
327 errno = 0; 327 errno = 0;
328 memset(&sa.peer, 0x00, sizeof(sa.peer)); 328 memset(&sa.peer, 0, sizeof(sa.peer));
329 dgram_adjust_rcv_timeout(b); 329 dgram_adjust_rcv_timeout(b);
330 ret = recvfrom(b->num, out, outl, 0, &sa.peer.sa, &sa.len); 330 ret = recvfrom(b->num, out, outl, 0, &sa.peer.sa, &sa.len);
331 331
@@ -577,7 +577,7 @@ default:
577 } 577 }
578 } else { 578 } else {
579 data->connected = 0; 579 data->connected = 0;
580 memset(&(data->peer), 0x00, sizeof(data->peer)); 580 memset(&(data->peer), 0, sizeof(data->peer));
581 } 581 }
582 break; 582 break;
583 case BIO_CTRL_DGRAM_GET_PEER: 583 case BIO_CTRL_DGRAM_GET_PEER:
@@ -852,7 +852,7 @@ dgram_sctp_read(BIO *b, char *out, int outl)
852 errno = 0; 852 errno = 0;
853 853
854 do { 854 do {
855 memset(&data->rcvinfo, 0x00, sizeof(struct bio_dgram_sctp_rcvinfo)); 855 memset(&data->rcvinfo, 0, sizeof(struct bio_dgram_sctp_rcvinfo));
856 iov.iov_base = out; 856 iov.iov_base = out;
857 iov.iov_len = outl; 857 iov.iov_len = outl;
858 msg.msg_name = NULL; 858 msg.msg_name = NULL;
@@ -1061,7 +1061,7 @@ dgram_sctp_write(BIO *b, const char *in, int inl)
1061 * disable all user parameters and flags. 1061 * disable all user parameters and flags.
1062 */ 1062 */
1063 if (in[0] != 23) { 1063 if (in[0] != 23) {
1064 memset(&handshake_sinfo, 0x00, sizeof(struct bio_dgram_sctp_sndinfo)); 1064 memset(&handshake_sinfo, 0, sizeof(struct bio_dgram_sctp_sndinfo));
1065#ifdef SCTP_SACK_IMMEDIATELY 1065#ifdef SCTP_SACK_IMMEDIATELY
1066 handshake_sinfo.snd_flags = SCTP_SACK_IMMEDIATELY; 1066 handshake_sinfo.snd_flags = SCTP_SACK_IMMEDIATELY;
1067#endif 1067#endif
@@ -1405,7 +1405,7 @@ BIO_dgram_sctp_wait_for_dry(BIO *b)
1405 return -1; 1405 return -1;
1406 1406
1407 /* peek for notification */ 1407 /* peek for notification */
1408 memset(&snp, 0x00, sizeof(union sctp_notification)); 1408 memset(&snp, 0, sizeof(union sctp_notification));
1409 iov.iov_base = (char *)&snp; 1409 iov.iov_base = (char *)&snp;
1410 iov.iov_len = sizeof(union sctp_notification); 1410 iov.iov_len = sizeof(union sctp_notification);
1411 msg.msg_name = NULL; 1411 msg.msg_name = NULL;
@@ -1426,7 +1426,7 @@ BIO_dgram_sctp_wait_for_dry(BIO *b)
1426 1426
1427 /* if we find a notification, process it and try again if necessary */ 1427 /* if we find a notification, process it and try again if necessary */
1428 while (msg.msg_flags & MSG_NOTIFICATION) { 1428 while (msg.msg_flags & MSG_NOTIFICATION) {
1429 memset(&snp, 0x00, sizeof(union sctp_notification)); 1429 memset(&snp, 0, sizeof(union sctp_notification));
1430 iov.iov_base = (char *)&snp; 1430 iov.iov_base = (char *)&snp;
1431 iov.iov_len = sizeof(union sctp_notification); 1431 iov.iov_len = sizeof(union sctp_notification);
1432 msg.msg_name = NULL; 1432 msg.msg_name = NULL;
@@ -1478,7 +1478,7 @@ BIO_dgram_sctp_wait_for_dry(BIO *b)
1478 data->handle_notifications(b, data->notification_context, (void*) &snp); 1478 data->handle_notifications(b, data->notification_context, (void*) &snp);
1479 1479
1480 /* found notification, peek again */ 1480 /* found notification, peek again */
1481 memset(&snp, 0x00, sizeof(union sctp_notification)); 1481 memset(&snp, 0, sizeof(union sctp_notification));
1482 iov.iov_base = (char *)&snp; 1482 iov.iov_base = (char *)&snp;
1483 iov.iov_len = sizeof(union sctp_notification); 1483 iov.iov_len = sizeof(union sctp_notification);
1484 msg.msg_name = NULL; 1484 msg.msg_name = NULL;
@@ -1525,7 +1525,7 @@ BIO_dgram_sctp_msg_waiting(BIO *b)
1525 /* Check if there are any messages waiting to be read */ 1525 /* Check if there are any messages waiting to be read */
1526 do 1526 do
1527 { 1527 {
1528 memset(&snp, 0x00, sizeof(union sctp_notification)); 1528 memset(&snp, 0, sizeof(union sctp_notification));
1529 iov.iov_base = (char *)&snp; 1529 iov.iov_base = (char *)&snp;
1530 iov.iov_len = sizeof(union sctp_notification); 1530 iov.iov_len = sizeof(union sctp_notification);
1531 msg.msg_name = NULL; 1531 msg.msg_name = NULL;
@@ -1548,7 +1548,7 @@ BIO_dgram_sctp_msg_waiting(BIO *b)
1548 dgram_sctp_handle_auth_free_key_event(b, &snp); 1548 dgram_sctp_handle_auth_free_key_event(b, &snp);
1549#endif 1549#endif
1550 1550
1551 memset(&snp, 0x00, sizeof(union sctp_notification)); 1551 memset(&snp, 0, sizeof(union sctp_notification));
1552 iov.iov_base = (char *)&snp; 1552 iov.iov_base = (char *)&snp;
1553 iov.iov_len = sizeof(union sctp_notification); 1553 iov.iov_len = sizeof(union sctp_notification);
1554 msg.msg_name = NULL; 1554 msg.msg_name = NULL;
diff --git a/src/lib/libssl/src/crypto/bio/bss_dgram.c b/src/lib/libssl/src/crypto/bio/bss_dgram.c
index 9809eda92e..b71311be0c 100644
--- a/src/lib/libssl/src/crypto/bio/bss_dgram.c
+++ b/src/lib/libssl/src/crypto/bio/bss_dgram.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_dgram.c,v 1.35 2014/11/26 05:37:26 bcook Exp $ */ 1/* $OpenBSD: bss_dgram.c,v 1.36 2014/11/26 05:39:06 bcook Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -325,7 +325,7 @@ dgram_read(BIO *b, char *out, int outl)
325 325
326 if (out != NULL) { 326 if (out != NULL) {
327 errno = 0; 327 errno = 0;
328 memset(&sa.peer, 0x00, sizeof(sa.peer)); 328 memset(&sa.peer, 0, sizeof(sa.peer));
329 dgram_adjust_rcv_timeout(b); 329 dgram_adjust_rcv_timeout(b);
330 ret = recvfrom(b->num, out, outl, 0, &sa.peer.sa, &sa.len); 330 ret = recvfrom(b->num, out, outl, 0, &sa.peer.sa, &sa.len);
331 331
@@ -577,7 +577,7 @@ default:
577 } 577 }
578 } else { 578 } else {
579 data->connected = 0; 579 data->connected = 0;
580 memset(&(data->peer), 0x00, sizeof(data->peer)); 580 memset(&(data->peer), 0, sizeof(data->peer));
581 } 581 }
582 break; 582 break;
583 case BIO_CTRL_DGRAM_GET_PEER: 583 case BIO_CTRL_DGRAM_GET_PEER:
@@ -852,7 +852,7 @@ dgram_sctp_read(BIO *b, char *out, int outl)
852 errno = 0; 852 errno = 0;
853 853
854 do { 854 do {
855 memset(&data->rcvinfo, 0x00, sizeof(struct bio_dgram_sctp_rcvinfo)); 855 memset(&data->rcvinfo, 0, sizeof(struct bio_dgram_sctp_rcvinfo));
856 iov.iov_base = out; 856 iov.iov_base = out;
857 iov.iov_len = outl; 857 iov.iov_len = outl;
858 msg.msg_name = NULL; 858 msg.msg_name = NULL;
@@ -1061,7 +1061,7 @@ dgram_sctp_write(BIO *b, const char *in, int inl)
1061 * disable all user parameters and flags. 1061 * disable all user parameters and flags.
1062 */ 1062 */
1063 if (in[0] != 23) { 1063 if (in[0] != 23) {
1064 memset(&handshake_sinfo, 0x00, sizeof(struct bio_dgram_sctp_sndinfo)); 1064 memset(&handshake_sinfo, 0, sizeof(struct bio_dgram_sctp_sndinfo));
1065#ifdef SCTP_SACK_IMMEDIATELY 1065#ifdef SCTP_SACK_IMMEDIATELY
1066 handshake_sinfo.snd_flags = SCTP_SACK_IMMEDIATELY; 1066 handshake_sinfo.snd_flags = SCTP_SACK_IMMEDIATELY;
1067#endif 1067#endif
@@ -1405,7 +1405,7 @@ BIO_dgram_sctp_wait_for_dry(BIO *b)
1405 return -1; 1405 return -1;
1406 1406
1407 /* peek for notification */ 1407 /* peek for notification */
1408 memset(&snp, 0x00, sizeof(union sctp_notification)); 1408 memset(&snp, 0, sizeof(union sctp_notification));
1409 iov.iov_base = (char *)&snp; 1409 iov.iov_base = (char *)&snp;
1410 iov.iov_len = sizeof(union sctp_notification); 1410 iov.iov_len = sizeof(union sctp_notification);
1411 msg.msg_name = NULL; 1411 msg.msg_name = NULL;
@@ -1426,7 +1426,7 @@ BIO_dgram_sctp_wait_for_dry(BIO *b)
1426 1426
1427 /* if we find a notification, process it and try again if necessary */ 1427 /* if we find a notification, process it and try again if necessary */
1428 while (msg.msg_flags & MSG_NOTIFICATION) { 1428 while (msg.msg_flags & MSG_NOTIFICATION) {
1429 memset(&snp, 0x00, sizeof(union sctp_notification)); 1429 memset(&snp, 0, sizeof(union sctp_notification));
1430 iov.iov_base = (char *)&snp; 1430 iov.iov_base = (char *)&snp;
1431 iov.iov_len = sizeof(union sctp_notification); 1431 iov.iov_len = sizeof(union sctp_notification);
1432 msg.msg_name = NULL; 1432 msg.msg_name = NULL;
@@ -1478,7 +1478,7 @@ BIO_dgram_sctp_wait_for_dry(BIO *b)
1478 data->handle_notifications(b, data->notification_context, (void*) &snp); 1478 data->handle_notifications(b, data->notification_context, (void*) &snp);
1479 1479
1480 /* found notification, peek again */ 1480 /* found notification, peek again */
1481 memset(&snp, 0x00, sizeof(union sctp_notification)); 1481 memset(&snp, 0, sizeof(union sctp_notification));
1482 iov.iov_base = (char *)&snp; 1482 iov.iov_base = (char *)&snp;
1483 iov.iov_len = sizeof(union sctp_notification); 1483 iov.iov_len = sizeof(union sctp_notification);
1484 msg.msg_name = NULL; 1484 msg.msg_name = NULL;
@@ -1525,7 +1525,7 @@ BIO_dgram_sctp_msg_waiting(BIO *b)
1525 /* Check if there are any messages waiting to be read */ 1525 /* Check if there are any messages waiting to be read */
1526 do 1526 do
1527 { 1527 {
1528 memset(&snp, 0x00, sizeof(union sctp_notification)); 1528 memset(&snp, 0, sizeof(union sctp_notification));
1529 iov.iov_base = (char *)&snp; 1529 iov.iov_base = (char *)&snp;
1530 iov.iov_len = sizeof(union sctp_notification); 1530 iov.iov_len = sizeof(union sctp_notification);
1531 msg.msg_name = NULL; 1531 msg.msg_name = NULL;
@@ -1548,7 +1548,7 @@ BIO_dgram_sctp_msg_waiting(BIO *b)
1548 dgram_sctp_handle_auth_free_key_event(b, &snp); 1548 dgram_sctp_handle_auth_free_key_event(b, &snp);
1549#endif 1549#endif
1550 1550
1551 memset(&snp, 0x00, sizeof(union sctp_notification)); 1551 memset(&snp, 0, sizeof(union sctp_notification));
1552 iov.iov_base = (char *)&snp; 1552 iov.iov_base = (char *)&snp;
1553 iov.iov_len = sizeof(union sctp_notification); 1553 iov.iov_len = sizeof(union sctp_notification);
1554 msg.msg_name = NULL; 1554 msg.msg_name = NULL;