Rename xmalloc_and_zero() to xzalloc().

The former name is more or less only used by tinc, the latter is used by other
projects as well, and shorter as well.
This commit is contained in:
Guus Sliepen 2013-05-01 17:31:33 +02:00
parent 9b9230a0a7
commit 5b07039b07
16 changed files with 24 additions and 24 deletions

View file

@ -40,7 +40,7 @@ typedef struct cipher_counter {
} cipher_counter_t;
static cipher_t *cipher_open(const EVP_CIPHER *evp_cipher) {
cipher_t *cipher = xmalloc_and_zero(sizeof *cipher);
cipher_t *cipher = xzalloc(sizeof *cipher);
cipher->cipher = evp_cipher;
EVP_CIPHER_CTX_init(&cipher->ctx);
@ -135,7 +135,7 @@ bool cipher_set_counter_key(cipher_t *cipher, void *key) {
}
if(!cipher->counter)
cipher->counter = xmalloc_and_zero(sizeof *cipher->counter);
cipher->counter = xzalloc(sizeof *cipher->counter);
else
cipher->counter->n = 0;

View file

@ -29,7 +29,7 @@
#include "../logger.h"
static digest_t *digest_open(const EVP_MD *evp_md, int maclength) {
digest_t *digest = xmalloc_and_zero(sizeof *digest);
digest_t *digest = xzalloc(sizeof *digest);
digest->digest = evp_md;
int digestlen = EVP_MD_size(digest->digest);