projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix UBSAN warnings about conversions and overflows.
[tinc]
/
src
/
tincd.c
diff --git
a/src/tincd.c
b/src/tincd.c
index
dff420a
..
560609c
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-491,8
+491,6
@@
int main(int argc, char **argv) {
/* Slllluuuuuuurrrrp! */
/* Slllluuuuuuurrrrp! */
- gettimeofday(&now, NULL);
- srand(now.tv_sec + now.tv_usec);
crypto_init();
if(!read_server_config(&config_tree)) {
crypto_init();
if(!read_server_config(&config_tree)) {
@@
-546,6
+544,9
@@
int main2(int argc, char **argv) {
#endif
char *priority = NULL;
#endif
char *priority = NULL;
+ gettimeofday(&now, NULL);
+ srand(now.tv_sec + now.tv_usec);
+
if(!detach()) {
return 1;
}
if(!detach()) {
return 1;
}