diff options
author | Werner Koch <wk@gnupg.org> | 2003-06-18 21:56:13 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-06-18 21:56:13 +0200 |
commit | c0c2c58054923d506f61ce9a71d509b48a381211 (patch) | |
tree | a8f82bffb44eb68eb726ff6db41fa715bcd29193 /g10/kbnode.c | |
parent | A small step for GnuPG but a huge leap for error codes. (diff) | |
download | gnupg2-c0c2c58054923d506f61ce9a71d509b48a381211.tar.xz gnupg2-c0c2c58054923d506f61ce9a71d509b48a381211.zip |
Finished the bulk of changes for gnupg 1.9. This included switching
to libgcrypt functions, using shared error codes from libgpg-error,
replacing the old functions we used to have in ../util by those in
../jnlib and ../common, renaming the malloc functions and a couple of
types. Note, that not all changes are listed below becuause they are
too similar and done at far too many places. As of today the code
builds using the current libgcrypt from CVS but it is very unlikely
that it actually works.
Diffstat (limited to 'g10/kbnode.c')
-rw-r--r-- | g10/kbnode.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/g10/kbnode.c b/g10/kbnode.c index 5df6d8d74..58daad871 100644 --- a/g10/kbnode.c +++ b/g10/kbnode.c @@ -23,6 +23,8 @@ #include <stdlib.h> #include <string.h> #include <assert.h> + +#include "gpg.h" #include "util.h" #include "memory.h" #include "packet.h" @@ -41,7 +43,7 @@ alloc_node(void) if( n ) unused_nodes = n->next; else - n = m_alloc( sizeof *n ); + n = xmalloc ( sizeof *n ); n->next = NULL; n->pkt = NULL; n->flag = 0; @@ -58,7 +60,7 @@ free_node( KBNODE n ) n->next = unused_nodes; unused_nodes = n; #else - m_free( n ); + xfree ( n ); #endif } } @@ -94,7 +96,7 @@ release_kbnode( KBNODE n ) n2 = n->next; if( !is_cloned_kbnode(n) ) { free_packet( n->pkt ); - m_free( n->pkt ); + xfree ( n->pkt ); } free_node( n ); n = n2; @@ -267,7 +269,7 @@ commit_kbnode( KBNODE *root ) nl->next = n->next; if( !is_cloned_kbnode(n) ) { free_packet( n->pkt ); - m_free( n->pkt ); + xfree ( n->pkt ); } free_node( n ); changed = 1; @@ -291,7 +293,7 @@ remove_kbnode( KBNODE *root, KBNODE node ) nl->next = n->next; if( !is_cloned_kbnode(n) ) { free_packet( n->pkt ); - m_free( n->pkt ); + xfree ( n->pkt ); } free_node( n ); } |