[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] introduce new tor_free() macro



Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common

Modified Files:
	tortls.c util.h 
Log Message:
introduce new tor_free() macro


Index: tortls.c
===================================================================
RCS file: /home/or/cvsroot/src/common/tortls.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- tortls.c	19 Oct 2003 01:15:36 -0000	1.26
+++ tortls.c	21 Oct 2003 09:48:58 -0000	1.27
@@ -467,7 +467,6 @@
   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");

Index: util.h
===================================================================
RCS file: /home/or/cvsroot/src/common/util.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- util.h	20 Oct 2003 20:19:57 -0000	1.19
+++ util.h	21 Oct 2003 09:48:58 -0000	1.20
@@ -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);