diff options
author | Roger Dingledine <arma@torproject.org> | 2003-10-21 09:48:58 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-10-21 09:48:58 +0000 |
commit | 069227db5b2be6af84ff2f225234f8485d2295f6 (patch) | |
tree | 49bf499c94d6223d23259d82a8cc07ed895a45bc /src | |
parent | e4127e4d3666da72415ad5f673f2f6136531836f (diff) | |
download | tor-069227db5b2be6af84ff2f225234f8485d2295f6.tar.gz tor-069227db5b2be6af84ff2f225234f8485d2295f6.zip |
introduce new tor_free() macro
svn:r643
Diffstat (limited to 'src')
-rw-r--r-- | src/common/tortls.c | 1 | ||||
-rw-r--r-- | src/common/util.h | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index dafbbee6da..b9f3dbab38 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -467,7 +467,6 @@ tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, int buflen) X509_NAME *name = NULL; int nid; int lenout; - int i; if (!(cert = SSL_get_peer_certificate(tls->ssl))) { log_fn(LOG_WARN, "Peer has no certificate"); diff --git a/src/common/util.h b/src/common/util.h index 01087df87d..3df098c684 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -32,18 +32,16 @@ #define INLINE inline #endif -#define xfree(p) do {if(p) {free(p); (p)=NULL;}} while(0) /* XXX use everywhere? */ void *tor_malloc(size_t size); void *tor_realloc(void *ptr, size_t size); char *tor_strdup(const char *s); -void tor_gettimeofday(struct timeval *timeval); +#define tor_free(p) do {if(p) {free(p); (p)=NULL;}} while(0) +void tor_gettimeofday(struct timeval *timeval); long tv_udiff(struct timeval *start, struct timeval *end); - void tv_addms(struct timeval *a, long ms); void tv_add(struct timeval *a, struct timeval *b); int tv_cmp(struct timeval *a, struct timeval *b); - time_t tor_timegm (struct tm *tm); int write_all(int fd, const char *buf, size_t count); |