diff options
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/common/util.h b/src/common/util.h index 01087df87..3df098c68 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); |