diff options
| author | deraadt <> | 2014-04-21 11:12:49 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-04-21 11:12:49 +0000 |
| commit | 5f744fb4f1803b9d1cdbd855ae9ee13216591f79 (patch) | |
| tree | 4a99167caf6845b449037c4bc1a9c7b9cb7f0d10 /src/lib/libcrypto/bio/bss_acpt.c | |
| parent | 98535d12bec7fba5d9c013e3e22de9096ebd2d5a (diff) | |
| download | openbsd-5f744fb4f1803b9d1cdbd855ae9ee13216591f79.tar.gz openbsd-5f744fb4f1803b9d1cdbd855ae9ee13216591f79.tar.bz2 openbsd-5f744fb4f1803b9d1cdbd855ae9ee13216591f79.zip | |
Bring malloc/calloc/realloc sequences to modern standard
ok guenther
Diffstat (limited to 'src/lib/libcrypto/bio/bss_acpt.c')
| -rw-r--r-- | src/lib/libcrypto/bio/bss_acpt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c index 4ab5856ed6..916af3cb20 100644 --- a/src/lib/libcrypto/bio/bss_acpt.c +++ b/src/lib/libcrypto/bio/bss_acpt.c | |||
| @@ -137,10 +137,8 @@ BIO_ACCEPT_new(void) | |||
| 137 | { | 137 | { |
| 138 | BIO_ACCEPT *ret; | 138 | BIO_ACCEPT *ret; |
| 139 | 139 | ||
| 140 | if ((ret = (BIO_ACCEPT *)malloc(sizeof(BIO_ACCEPT))) == NULL) | 140 | if ((ret = calloc(1, sizeof(BIO_ACCEPT))) == NULL) |
| 141 | return (NULL); | 141 | return (NULL); |
| 142 | |||
| 143 | memset(ret, 0, sizeof(BIO_ACCEPT)); | ||
| 144 | ret->accept_sock = -1; | 142 | ret->accept_sock = -1; |
| 145 | ret->bind_mode = BIO_BIND_NORMAL; | 143 | ret->bind_mode = BIO_BIND_NORMAL; |
| 146 | return (ret); | 144 | return (ret); |
