[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tlsdate/master] David Hill noticed that we sometimes leave &warp_time uninitalized
commit a2b4adc5724ee531fc875c4a64a206584e0df3c6
Author: Jacob Appelbaum <jacob@xxxxxxxxxxxxx>
Date: Sat Jun 29 20:05:04 2013 +0200
David Hill noticed that we sometimes leave &warp_time uninitalized
---
src/tlsdate-helper.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/tlsdate-helper.c b/src/tlsdate-helper.c
index 35d6779..e625946 100644
--- a/src/tlsdate-helper.c
+++ b/src/tlsdate-helper.c
@@ -1089,18 +1089,16 @@ main(int argc, char **argv)
leap = (0 == strcmp ("leapaway", argv[10]));
proxy = (0 == strcmp ("none", argv[11]) ? NULL : argv[11]);
- if (timewarp)
- {
+ /* Initalize warp_time with RECENT_COMPILE_DATE */
+ clock_init_time(&warp_time, RECENT_COMPILE_DATE, 0);
- verb ("V: RECENT_COMPILE_DATE is %lu.%06lu\n",
- (unsigned long) CLOCK_SEC(&warp_time),
- (unsigned long) CLOCK_USEC(&warp_time));
+ verb ("V: RECENT_COMPILE_DATE is %lu.%06lu\n",
+ (unsigned long) CLOCK_SEC(&warp_time),
+ (unsigned long) CLOCK_USEC(&warp_time));
- if (1 == setclock) {
- clock_init_time(&warp_time, RECENT_COMPILE_DATE, 0);
- } else {
- verb ("V: we'll do the time warp another time - we're not setting clock\n");
- }
+ if (1 != timewarp)
+ {
+ verb ("V: we'll do the time warp another time - we're not setting clock\n");
}
/* We are not going to set the clock, thus no need to stay root */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits