X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/0f4971d043c38bae1bfb95201622a1405110f899..2ded7b1e4475beb7a3f132deeeae807861bdc399:/mem.c diff --git a/mem.c b/mem.c index 9bee71d..5ba9090 100644 --- a/mem.c +++ b/mem.c @@ -4,16 +4,15 @@ * Jonathan McDowell * * Copyright 2002 Project Purple - * - * $Id: mem.c,v 1.5 2003/06/04 20:57:10 noodles Exp $ */ -#include #include #include +#include #include "keystructs.h" #include "ll.h" +#include "log.h" #include "mem.h" /** @@ -28,7 +27,7 @@ struct openpgp_packet *packet_dup(struct openpgp_packet *packet) { struct openpgp_packet *newpacket = NULL; - assert(packet != NULL); + log_assert(packet != NULL); newpacket = malloc(sizeof (struct openpgp_packet)); if (newpacket != NULL) { @@ -60,8 +59,8 @@ void packet_list_add(struct openpgp_packet_list **list, struct openpgp_packet_list **list_end, struct openpgp_packet_list *packet_list) { - assert(list != NULL); - assert(list_end != NULL); + log_assert(list != NULL); + log_assert(list_end != NULL); for (; packet_list != NULL; packet_list = packet_list->next) { ADD_PACKET_TO_LIST((*list_end), @@ -82,7 +81,7 @@ void packet_list_add(struct openpgp_packet_list **list, * including the data part. */ void free_packet(struct openpgp_packet *packet) { - assert(packet != NULL); + log_assert(packet != NULL); if (packet->data != NULL) { free(packet->data); @@ -101,7 +100,7 @@ void free_packet(struct openpgp_packet *packet) { void free_packet_list(struct openpgp_packet_list *packet_list) { struct openpgp_packet_list *nextpacket = NULL; - assert(packet_list != NULL); + log_assert(packet_list != NULL); while (packet_list != NULL) { nextpacket = packet_list->next; @@ -124,7 +123,7 @@ void free_signedpacket_list( struct openpgp_signedpacket_list *signedpacket_list) { struct openpgp_signedpacket_list *nextpacket = NULL; - assert(signedpacket_list != NULL); + log_assert(signedpacket_list != NULL); while (signedpacket_list != NULL) { nextpacket = signedpacket_list->next; @@ -149,7 +148,7 @@ void free_signedpacket_list( void free_publickey(struct openpgp_publickey *key) { struct openpgp_publickey *nextkey = NULL; - assert(key != NULL); + log_assert(key != NULL); while (key != NULL) { nextkey = key->next;