diff options
author | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
commit | 66f807ed8b3634dc73d9f7526c484e43f094c0ee (patch) | |
tree | 21e792ce590e1bcf9b343890605a1b4c6a9016b3 /sys/opencrypto/cryptosoft.c | |
parent | a779c60ce0a41cd14710a8a12cfa22955108b27a (diff) | |
download | FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.zip FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.tar.gz |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
Diffstat (limited to 'sys/opencrypto/cryptosoft.c')
-rw-r--r-- | sys/opencrypto/cryptosoft.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c index ba83718..d115dbc 100644 --- a/sys/opencrypto/cryptosoft.c +++ b/sys/opencrypto/cryptosoft.c @@ -523,7 +523,7 @@ swcr_compdec(struct cryptodesc *crd, struct swcr_data *sw, * copy in a buffer. */ - MALLOC(data, u_int8_t *, crd->crd_len, M_CRYPTO_DATA, M_NOWAIT); + data = malloc(crd->crd_len, M_CRYPTO_DATA, M_NOWAIT); if (data == NULL) return (EINVAL); crypto_copydata(flags, buf, crd->crd_skip, crd->crd_len, data); @@ -533,7 +533,7 @@ swcr_compdec(struct cryptodesc *crd, struct swcr_data *sw, else result = cxf->decompress(data, crd->crd_len, &out); - FREE(data, M_CRYPTO_DATA); + free(data, M_CRYPTO_DATA); if (result == 0) return EINVAL; @@ -545,7 +545,7 @@ swcr_compdec(struct cryptodesc *crd, struct swcr_data *sw, if (crd->crd_flags & CRD_F_COMP) { if (result > crd->crd_len) { /* Compression was useless, we lost time */ - FREE(out, M_CRYPTO_DATA); + free(out, M_CRYPTO_DATA); return 0; } } @@ -576,7 +576,7 @@ swcr_compdec(struct cryptodesc *crd, struct swcr_data *sw, } } } - FREE(out, M_CRYPTO_DATA); + free(out, M_CRYPTO_DATA); return 0; } @@ -635,7 +635,7 @@ swcr_newsession(device_t dev, u_int32_t *sid, struct cryptoini *cri) *sid = i; while (cri) { - MALLOC(*swd, struct swcr_data *, sizeof(struct swcr_data), + *swd = malloc(sizeof(struct swcr_data), M_CRYPTO_DATA, M_NOWAIT|M_ZERO); if (*swd == NULL) { swcr_freesession(dev, i); @@ -873,7 +873,7 @@ swcr_freesession(device_t dev, u_int64_t tid) break; } - FREE(swd, M_CRYPTO_DATA); + free(swd, M_CRYPTO_DATA); } return 0; } @@ -1036,7 +1036,7 @@ swcr_detach(device_t dev) { crypto_unregister_all(swcr_id); if (swcr_sessions != NULL) - FREE(swcr_sessions, M_CRYPTO_DATA); + free(swcr_sessions, M_CRYPTO_DATA); } static device_method_t swcr_methods[] = { |