Loading src/common/compat.h +3 −0 Changes for src/common/compat.h: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -26,6 +26,9 @@ #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif #ifdef HAVE_TIME_H #include <time.h> #endif #include <stdarg.h> #ifndef NULL_REP_IS_ZERO_BYTES Loading src/common/log.c +6 −0 Changes for src/common/log.c: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -14,6 +14,12 @@ const char log_c_id[] = "$Id$"; #include <assert.h> #include <stdlib.h> #include <string.h> #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif #ifdef HAVE_TIME_H #include <time.h> #endif #include "./util.h" #include "./log.h" Loading src/common/test.h +10 −3 Changes for src/common/test.h: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -49,13 +49,14 @@ extern int have_failed; return; \ } STMT_END #define test_eq(expr1, expr2) \ #define test_eq_type(tp, fmt, expr1, expr2) \ STMT_BEGIN \ long v1=(long)(expr1), v2=(long)(expr2); \ tp v1=(tp)(expr1); \ tp v2=(tp)(expr2); \ if (v1==v2) { printf("."); fflush(stdout); } else { \ have_failed = 1; \ printf("\nFile %s: line %d (%s): Assertion failed: (%s==%s)\n" \ " (%ld != %ld)\n", \ " "fmt "!="fmt"\n", \ _SHORT_FILE_, \ __LINE__, \ PRETTY_FUNCTION, \ Loading @@ -64,6 +65,12 @@ extern int have_failed; return; \ } STMT_END #define test_eq(expr1, expr2) \ test_eq_type(long, "%ld", expr1, expr2) #define test_eq_ptr(expr1, expr2) \ test_eq_type(void*, "%p", expr1, expr2) #define test_neq(expr1, expr2) \ STMT_BEGIN \ long v1=(long)(expr1), v2=(long)(expr2); \ Loading src/common/util.c +3 −0 Changes for src/common/util.c: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ const char util_c_id[] = "$Id$"; #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif #ifdef HAVE_TIME_H #include <time.h> #endif #ifndef O_BINARY #define O_BINARY 0 Loading src/or/circuitbuild.c +1 −1 Changes for src/or/circuitbuild.c: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1672,7 +1672,7 @@ remove_dead_helpers(void) for (i = 0; i < smartlist_len(helper_nodes); ) { helper_node_t *helper = smartlist_get(helper_nodes, i); char *why = NULL; const char *why = NULL; time_t since = 0; if (helper->unlisted_since + HELPER_ALLOW_UNLISTED > now) { why = "unlisted"; Loading Loading
src/common/compat.h +3 −0 Changes for src/common/compat.h: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -26,6 +26,9 @@ #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif #ifdef HAVE_TIME_H #include <time.h> #endif #include <stdarg.h> #ifndef NULL_REP_IS_ZERO_BYTES Loading
src/common/log.c +6 −0 Changes for src/common/log.c: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -14,6 +14,12 @@ const char log_c_id[] = "$Id$"; #include <assert.h> #include <stdlib.h> #include <string.h> #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif #ifdef HAVE_TIME_H #include <time.h> #endif #include "./util.h" #include "./log.h" Loading
src/common/test.h +10 −3 Changes for src/common/test.h: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -49,13 +49,14 @@ extern int have_failed; return; \ } STMT_END #define test_eq(expr1, expr2) \ #define test_eq_type(tp, fmt, expr1, expr2) \ STMT_BEGIN \ long v1=(long)(expr1), v2=(long)(expr2); \ tp v1=(tp)(expr1); \ tp v2=(tp)(expr2); \ if (v1==v2) { printf("."); fflush(stdout); } else { \ have_failed = 1; \ printf("\nFile %s: line %d (%s): Assertion failed: (%s==%s)\n" \ " (%ld != %ld)\n", \ " "fmt "!="fmt"\n", \ _SHORT_FILE_, \ __LINE__, \ PRETTY_FUNCTION, \ Loading @@ -64,6 +65,12 @@ extern int have_failed; return; \ } STMT_END #define test_eq(expr1, expr2) \ test_eq_type(long, "%ld", expr1, expr2) #define test_eq_ptr(expr1, expr2) \ test_eq_type(void*, "%p", expr1, expr2) #define test_neq(expr1, expr2) \ STMT_BEGIN \ long v1=(long)(expr1), v2=(long)(expr2); \ Loading
src/common/util.c +3 −0 Changes for src/common/util.c: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ const char util_c_id[] = "$Id$"; #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif #ifdef HAVE_TIME_H #include <time.h> #endif #ifndef O_BINARY #define O_BINARY 0 Loading
src/or/circuitbuild.c +1 −1 Changes for src/or/circuitbuild.c: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1672,7 +1672,7 @@ remove_dead_helpers(void) for (i = 0; i < smartlist_len(helper_nodes); ) { helper_node_t *helper = smartlist_get(helper_nodes, i); char *why = NULL; const char *why = NULL; time_t since = 0; if (helper->unlisted_since + HELPER_ALLOW_UNLISTED > now) { why = "unlisted"; Loading